{"text_format":"1","workbook":"xlsx","n_sheets":4,"sheets":["Krona","License","krona-2.0.js","images"],"not_rendered":{"charts":0,"images":1,"macros":1,"external_links":0,"defined_names":2,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":2,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Krona","index":0,"n_rows":166,"n_cols":9,"rows_kept":166,"cut":false,"hidden":false,"merged":[]}
[]
[null,null,null,"SuperKingdom"]
["Dataset","Organisms",null,"Category 1","Category 2","Category 3","Other categories …"]
["Entraf",4,null,"Archaea","Candidatus Thermoplasmatota","Thermoplasmata","Thermoplasmatales","Thermoplasmataceae","Thermoplasma"]
["Entraf",1,null,"Archaea","Candidatus Thermoplasmatota","Thermoplasmata","Thermoplasmatales","unclassified","Thermoplasmatales"]
["Entraf",4,null,"Archaea","Euryarchaeota","Archaeoglobi","Archaeoglobales","Archaeoglobaceae","Archaeoglobus"]
["Entraf",1,null,"Archaea","Euryarchaeota","Halobacteria","Halobacteriales","Haloarculaceae","Haloarcula"]
["Entraf",1,null,"Archaea","Euryarchaeota","Halobacteria","Halobacteriales","Haloarculaceae","Halomicrobium"]
["Entraf",1,null,"Archaea","Euryarchaeota","Halobacteria","Halobacteriales","Halobacteriaceae","Halobacterium"]
["Entraf",1,null,"Archaea","Euryarchaeota","Halobacteria","Haloferacales","Haloferacaceae","Haloferax"]
["Entraf",2,null,"Archaea","Euryarchaeota","Methanobacteria","Methanobacteriales","Methanobacteriaceae","Methanothermobacter"]
["Entraf",2,null,"Archaea","Euryarchaeota","Methanobacteria","Methanobacteriales","Methanothermaceae","Methanothermus"]
["Entraf",5,null,"Archaea","Euryarchaeota","Methanococci","Methanococcales","Methanocaldococcaceae","Methanocaldococcus"]
["Entraf",2,null,"Archaea","Euryarchaeota","Methanomicrobia","Methanosarcinales","Methanosarcinaceae","Methanosarcina"]
["Entraf",1,null,"Archaea","Euryarchaeota","Methanopyri","Methanopyrales","Methanopyraceae","Methanopyrus"]
["Entraf",22,null,"Archaea","Euryarchaeota","Thermococci","Thermococcales","Thermococcaceae","Pyrococcus"]
["Entraf",1,null,"Archaea","Euryarchaeota","Thermococci","Thermococcales","Thermococcaceae","Thermococcus"]
["Entraf",1,null,"Archaea","Nitrososphaerota","Nitrososphaeria","Nitrosopumilales","Nitrosopumilaceae","Nitrosopumilus"]
["Entraf",2,null,"Archaea","Thermoproteota","Thermoprotei","Desulfurococcales","Desulfurococcaceae","Aeropyrum"]
["Entraf",1,null,"Archaea","Thermoproteota","Thermoprotei","Desulfurococcales","Pyrodictiaceae","Hyperthermus"]
["Entraf",11,null,"Archaea","Thermoproteota","Thermoprotei","Sulfolobales","Sulfolobaceae","Saccharolobus"]
["Entraf",6,null,"Archaea","Thermoproteota","Thermoprotei","Sulfolobales","Sulfolobaceae","Sulfolobus"]
["Entraf",3,null,"Archaea","Thermoproteota","Thermoprotei","Sulfolobales","Sulfolobaceae","Sulfurisphaera"]
["Entraf",1,null,"Bacteria","Acidobacteriota","Terriglobia","Terriglobales","Acidobacteriaceae","Acidobacterium"]
["Entraf",2,null,"Bacteria","Actinomycetota","Actinomycetes","Bifidobacteriales","Bifidobacteriaceae","Bifidobacterium"]
["Entraf",1,null,"Bacteria","Actinomycetota","Actinomycetes","Bifidobacteriales","Bifidobacteriaceae","Gardnerella"]
["Entraf",1,null,"Bacteria","Actinomycetota","Actinomycetes","Kitasatosporales","Streptomycetaceae","Kitasatospora"]
["Entraf",103,null,"Bacteria","Actinomycetota","Actinomycetes","Kitasatosporales","Streptomycetaceae","Streptomyces"]
["Entraf",1,null,"Bacteria","Actinomycetota","Actinomycetes","Micromonosporales","Micromonosporaceae","Actinoplanes"]
["Entraf",24,null,"Bacteria","Actinomycetota","Actinomycetes","Mycobacteriales","Corynebacteriaceae","Corynebacterium"]
["Entraf",1,null,"Bacteria","Actinomycetota","Actinomycetes","Mycobacteriales","Dietziaceae","Dietzia"]
["Entraf",188,null,"Bacteria","Actinomycetota","Actinomycetes","Mycobacteriales","Mycobacteriaceae","Mycobacterium"]
["Entraf",2,null,"Bacteria","Actinomycetota","Actinomycetes","Mycobacteriales","Mycobacteriaceae","Mycobacteroides"]
["Entraf",11,null,"Bacteria","Actinomycetota","Actinomycetes","Mycobacteriales","Mycobacteriaceae","Mycolicibacterium"]
["Entraf",23,null,"Bacteria","Actinomycetota","Actinomycetes","Mycobacteriales","Nocardiaceae","Rhodococcus"]
["Entraf",1,null,"Bacteria","Actinomycetota","Actinomycetes","Propionibacteriales","Kribbellaceae","Kribbella"]
["Entraf",1,null,"Bacteria","Actinomycetota","Actinomycetes","Pseudonocardiales","Pseudonocardiaceae","Amycolatopsis"]
["Entraf",2,null,"Bacteria","Actinomycetota","Actinomycetes","Pseudonocardiales","Pseudonocardiaceae","Saccharomonospora"]
["Entraf",3,null,"Bacteria","Actinomycetota","Actinomycetes","Pseudonocardiales","Pseudonocardiaceae","Saccharopolyspora"]
["Entraf",2,null,"Bacteria","Actinomycetota","Actinomycetes","Streptosporangiales","Nocardiopsaceae","Thermobifida"]
["Entraf",2,null,"Bacteria","Actinomycetota","Coriobacteriia","Eggerthellales","Eggerthellaceae","Eggerthella"]
["Entraf",8,null,"Bacteria","Aquificota","Aquificae","Aquificales","Aquificaceae","Aquifex"]
["Entraf",1,null,"Bacteria","Bacillota","Bacilli","Bacillales","Alicyclobacillaceae","Alicyclobacillus"]
["Entraf",170,null,"Bacteria","Bacillota","Bacilli","Bacillales","Bacillaceae","Bacillus"]
["Entraf",9,null,"Bacteria","Bacillota","Bacilli","Bacillales","Bacillaceae","Geobacillus"]
["Entraf",4,null,"Bacteria","Bacillota","Bacilli","Bacillales","Bacillaceae","Halalkalibacterium"]
["Entraf",2,null,"Bacteria","Bacillota","Bacilli","Bacillales","Bacillaceae","Priestia"]
["Entraf",1,null,"Bacteria","Bacillota","Bacilli","Bacillales","Bacillaceae","Shouchella"]
["Entraf",1,null,"Bacteria","Bacillota","Bacilli","Bacillales","Bacillales Family XII. Incertae Sedis","Exiguobacterium"]
["Entraf",26,null,"Bacteria","Bacillota","Bacilli","Bacillales","Listeriaceae","Listeria"]
["Entraf",1,null,"Bacteria","Bacillota","Bacilli","Bacillales","Planococcaceae","Paenisporosarcina"]
["Entraf",120,null,"Bacteria","Bacillota","Bacilli","Bacillales","Staphylococcaceae","Staphylococcus"]
["Entraf",13,null,"Bacteria","Bacillota","Bacilli","Lactobacillales","Enterococcaceae","Enterococcus"]
["Entraf",1,null,"Bacteria","Bacillota","Bacilli","Lactobacillales","Lactobacillaceae","Lacticaseibacillus"]
["Entraf",4,null,"Bacteria","Bacillota","Bacilli","Lactobacillales","Lactobacillaceae","Lactiplantibacillus"]
["Entraf",2,null,"Bacteria","Bacillota","Bacilli","Lactobacillales","Lactobacillaceae","Oenococcus"]
["Entraf",10,null,"Bacteria","Bacillota","Bacilli","Lactobacillales","Streptococcaceae","Lactococcus"]
["Entraf",57,null,"Bacteria","Bacillota","Bacilli","Lactobacillales","Streptococcaceae","Streptococcus"]
["Entraf",1,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Clostridiaceae","Alkaliphilus"]
["Entraf",2,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Clostridiaceae","Clostridium"]
["Entraf",3,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Desulfitobacteriaceae","Desulfitobacterium"]
["Entraf",1,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Lachnospiraceae","Agathobacter"]
["Entraf",2,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Lachnospiraceae","Blautia"]
["Entraf",1,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Lachnospiraceae","Lachnospira"]
["Entraf",1,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Oscillospiraceae","Acetivibrio"]
["Entraf",1,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Oscillospiraceae","Ruminiclostridium"]
["Entraf",7,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Peptostreptococcaceae","Clostridioides"]
["Entraf",1,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Syntrophomonadaceae","Syntrophomonas"]
["Entraf",1,null,"Bacteria","Bacillota","Clostridia","Eubacteriales","Thermincolaceae","Thermincola"]
["Entraf",1,null,"Bacteria","Bacillota","Clostridia","Thermoanaerobacterales","Thermoanaerobacteraceae","Carboxydothermus"]
["Entraf",6,null,"Bacteria","Bacteroidota","Bacteroidia","Bacteroidales","Bacteroidaceae","Bacteroides"]
["Entraf",1,null,"Bacteria","Bacteroidota","Bacteroidia","Bacteroidales","Bacteroidaceae","Phocaeicola"]
["Entraf",2,null,"Bacteria","Bacteroidota","Bacteroidia","Bacteroidales","Porphyromonadaceae","Porphyromonas"]
["Entraf",2,null,"Bacteria","Bdellovibrionota","Bdellovibrionia","Bdellovibrionales","Pseudobdellovibrionaceae","Bdellovibrio"]
["Entraf",7,null,"Bacteria","Campylobacterota","Epsilonproteobacteria","Campylobacterales","Campylobacteraceae","Campylobacter"]
["Entraf",14,null,"Bacteria","Campylobacterota","Epsilonproteobacteria","Campylobacterales","Helicobacteraceae","Helicobacter"]
["Entraf",2,null,"Bacteria","Chlamydiota","Chlamydiia","Chlamydiales","Chlamydiaceae","Chlamydia"]
["Entraf",1,null,"Bacteria","Chlorobiota","Chlorobiia","Chlorobiales","Chlorobiaceae","Chlorobaculum"]
["Entraf",3,null,"Bacteria","Chloroflexota","Chloroflexia","Chloroflexales","Chloroflexaceae","Chloroflexus"]
["Entraf",3,null,"Bacteria","Chloroflexota","Dehalococcoidia","Dehalococcoidales","Dehalococcoidaceae","Dehalococcoides"]
["Entraf",1,null,"Bacteria","Cyanobacteriota","Cyanophyceae","Chroococcales","Geminocystaceae","Picosynechococcus"]
["Entraf",9,null,"Bacteria","Cyanobacteriota","Cyanophyceae","Nostocales","Nostocaceae","Nostoc"]
["Entraf",6,null,"Bacteria","Cyanobacteriota","Cyanophyceae","Synechococcales","Merismopediaceae","Synechocystis"]
["Entraf",1,null,"Bacteria","Cyanobacteriota","Cyanophyceae","Synechococcales","Prochlorococcaceae","Parasynechococcus"]
["Entraf",6,null,"Bacteria","Cyanobacteriota","Cyanophyceae","Synechococcales","Synechococcaceae","Synechococcus"]
["Entraf",6,null,"Bacteria","Deinococcota","Deinococci","Deinococcales","Deinococcaceae","Deinococcus"]
["Entraf",15,null,"Bacteria","Deinococcota","Deinococci","Thermales","Thermaceae","Thermus"]
["Entraf",1,null,"Bacteria","Fibrobacterota","Fibrobacteria","Fibrobacterales","Fibrobacteraceae","Fibrobacter"]
["Entraf",1,null,"Bacteria","Fusobacteriota","Fusobacteriia","Fusobacteriales","Fusobacteriaceae","Fusobacterium"]
["Entraf",2,null,"Bacteria","Mycoplasmatota","-","Mycoplasmoidales","Mycoplasmoidaceae","Mycoplasmoides"]
["Entraf",4,null,"Bacteria","Myxococcota","Myxococcia","Myxococcales","Myxococcaceae","Myxococcus"]
["Entraf",1,null,"Bacteria","Planctomycetota","Planctomycetia","Planctomycetales","Planctomycetaceae","Planctopirus"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Acidithiobacillia","Acidithiobacillales","Acidithiobacillaceae","Acidithiobacillus"]
["Entraf",6,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Caulobacterales","Caulobacteraceae","Caulobacter"]
["Entraf",4,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Hyphomicrobiales","Brucellaceae","Brucella"]
["Entraf",6,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Hyphomicrobiales","Nitrobacteraceae","Bradyrhizobium"]
["Entraf",5,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Hyphomicrobiales","Nitrobacteraceae","Rhodopseudomonas"]
["Entraf",4,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Hyphomicrobiales","Phyllobacteriaceae","Mesorhizobium"]
["Entraf",15,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Hyphomicrobiales","Rhizobiaceae","Agrobacterium"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Hyphomicrobiales","Rhizobiaceae","Mycoplana"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Hyphomicrobiales","Rhizobiaceae","Rhizobium"]
["Entraf",21,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Hyphomicrobiales","Rhizobiaceae","Sinorhizobium"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Magnetococcales","Magnetococcaceae","Magnetococcus"]
["Entraf",3,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rhodobacterales","Paracoccaceae","Cereibacter"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rhodobacterales","Paracoccaceae","Paracoccus"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rhodobacterales","Paracoccaceae","Rhodobacter"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rhodobacterales","Roseobacteraceae","Dinoroseobacter"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rhodobacterales","Roseobacteraceae","Jannaschia"]
["Entraf",11,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rhodobacterales","Roseobacteraceae","Ruegeria"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rhodospirillales","Rhodospirillaceae","Magnetospirillum"]
["Entraf",3,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rhodospirillales","Rhodospirillaceae","Rhodospirillum"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rickettsiales","Anaplasmataceae","Ehrlichia"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Rickettsiales","Rickettsiaceae","Rickettsia"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Sphingomonadales","Erythrobacteraceae","Erythrobacter"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Alphaproteobacteria","Sphingomonadales","Sphingomonadaceae","Novosphingobium"]
["Entraf",5,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Burkholderiales","Alcaligenaceae","Bordetella"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Burkholderiales","Alcaligenaceae","unclassified Alcaligenaceae"]
["Entraf",8,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Burkholderiales","Burkholderiaceae","Burkholderia"]
["Entraf",5,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Burkholderiales","Burkholderiaceae","Cupriavidus"]
["Entraf",3,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Burkholderiales","Burkholderiaceae","Paraburkholderia"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Burkholderiales","Comamonadaceae","Acidovorax"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Burkholderiales","Comamonadaceae","Comamonas"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Burkholderiales","Comamonadaceae","Variovorax"]
["Entraf",4,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Neisseriales","Chromobacteriaceae","Chromobacterium"]
["Entraf",13,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Neisseriales","Neisseriaceae","Neisseria"]
["Entraf",3,null,"Bacteria","Pseudomonadota","Betaproteobacteria","Nitrosomonadales","Nitrosomonadaceae","Nitrosomonas"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Aeromonadales","Aeromonadaceae","Aeromonas"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Alteromonadales","Colwelliaceae","Colwellia"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Alteromonadales","Pseudoalteromonadaceae","Pseudoalteromonas"]
["Entraf",16,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Alteromonadales","Shewanellaceae","Shewanella"]
["Entraf",3,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Enterobacteriaceae","Citrobacter"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Enterobacteriaceae","Enterobacter"]
["Entraf",279,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Enterobacteriaceae","Escherichia"]
["Entraf",18,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Enterobacteriaceae","Klebsiella"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Enterobacteriaceae","Pluralibacter"]
["Entraf",25,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Enterobacteriaceae","Salmonella"]
["Entraf",3,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Enterobacteriaceae","Shigella"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Erwiniaceae","Erwinia"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Hafniaceae","Edwardsiella"]
["Entraf",3,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Morganellaceae","Proteus"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Pectobacteriaceae","Dickeya"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Pectobacteriaceae","Pectobacterium"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Yersiniaceae","Serratia"]
["Entraf",13,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Enterobacterales","Yersiniaceae","Yersinia"]
["Entraf",4,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Legionellales","Coxiellaceae","Coxiella"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Legionellales","Legionellaceae","Legionella"]
["Entraf",10,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Moraxellales","Moraxellaceae","Acinetobacter"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Pasteurellales","Pasteurellaceae","Actinobacillus"]
["Entraf",5,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Pasteurellales","Pasteurellaceae","Haemophilus"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Pasteurellales","Pasteurellaceae","Mannheimia"]
["Entraf",2,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Pasteurellales","Pasteurellaceae","Pasteurella"]
["Entraf",3,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Pseudomonadales","Marinobacteraceae","Marinobacter"]
["Entraf",132,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Pseudomonadales","Pseudomonadaceae","Pseudomonas"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Thiotrichales","Francisellaceae","Francisella"]
["Entraf",9,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Vibrionales","Vibrionaceae","Aliivibrio"]
["Entraf",58,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Vibrionales","Vibrionaceae","Vibrio"]
["Entraf",1,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Xanthomonadales","Xanthomonadaceae","Stenotrophomonas"]
["Entraf",20,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Xanthomonadales","Xanthomonadaceae","Xanthomonas"]
["Entraf",4,null,"Bacteria","Pseudomonadota","Gammaproteobacteria","Xanthomonadales","Xanthomonadaceae","Xylella"]
["Entraf",4,null,"Bacteria","Spirochaetota","Spirochaetia","Leptospirales","Leptospiraceae","Leptospira"]
["Entraf",1,null,"Bacteria","Spirochaetota","Spirochaetia","Spirochaetales","Borreliaceae","Borreliella"]
["Entraf",1,null,"Bacteria","Thermodesulfobacteriota","Desulfovibrionia","Desulfovibrionales","Desulfovibrionaceae","Desulfovibrio"]
["Entraf",5,null,"Bacteria","Thermodesulfobacteriota","Desulfuromonadia","Geobacterales","Geobacteraceae","Geobacter"]
["Entraf",1,null,"Bacteria","Thermodesulfobacteriota","Syntrophia","Syntrophales","Syntrophaceae","Syntrophus"]
["Entraf",1,null,"Bacteria","Thermotogota","Thermotogae","Petrotogales","Petrotogaceae","Petrotoga"]
["Entraf",17,null,"Bacteria","Thermotogota","Thermotogae","Thermotogales","Thermotogaceae","Thermotoga"]

{"sheet":"License","index":1,"n_rows":65,"n_cols":1,"rows_kept":65,"cut":false,"hidden":false,"merged":[]}
["PURPOSE"]
[]
["Krona is a flexible tool for exploring the relative proportions of"]
["hierarchical data, such as metagenomic classifications, using a"]
["radial, space-filling display. It is implemented using HTML5 and"]
["JavaScript, allowing charts to be explored locally or served over the"]
["Internet, requiring only a current version of any major web"]
["browser. Krona charts can be created using an Excel template or from"]
["common bioinformatics formats using the provided conversion scripts."]
[]
[]
["COPYRIGHT LICENSE"]
[]
["Copyright © 2011, Battelle National Biodefense Institute's (BNBI);"]
["all rights reserved. Authored by: Brian Ondov, Nicholas Bergman, and"]
["Adam Phillippy"]
[]
["This Software was prepared for the Department of Homeland Security"]
["(DHS) by the Battelle National Biodefense Institute, LLC (BNBI) as"]
["part of contract HSHQDC-07-C-00020 to manage and operate the National"]
["Biodefense Analysis and Countermeasures Center (NBACC), a Federally"]
["Funded Research and Development Center."]
[]
["Redistribution and use in source and binary forms, with or without"]
["modification, are permitted provided that the following conditions are"]
["met:"]
[]
["* Redistributions of source code must retain the above copyright"]
["  notice, this list of conditions and the following disclaimer."]
[]
["* Redistributions in binary form must reproduce the above copyright"]
["  notice, this list of conditions and the following disclaimer in the"]
["  documentation and/or other materials provided with the distribution."]
[]
["* Neither the name of the Battelle National Biodefense Institute nor"]
["  the names of its contributors may be used to endorse or promote"]
["  products derived from this software without specific prior written"]
["  permission."]
[]
["THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS"]
["AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT"]
["LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR"]
["A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT"]
["HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,"]
["SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT"]
["LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,"]
["DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY"]
["THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT"]
["(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE"]
["OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."]
[]
[]
["TRADEMARK LICENSE"]
[]
["KRONA™ is a trademark of the Department of Homeland Security, and use"]
["of the trademark is subject to the following conditions:"]
[]
["* Distribution of the unchanged, official code/software using the"]
["  KRONA™ mark is hereby permitted by the Department of Homeland"]
["  Security, provided that the software is distributed without charge"]
["  and modification."]
[]
["* Distribution of altered source code/software using the KRONA™ mark"]
["  is not permitted unless written permission has been granted by the"]
["  Department of Homeland Security."]

{"sheet":"krona-2.0.js","index":2,"n_rows":6619,"n_cols":1,"rows_kept":6619,"cut":false,"hidden":true,"merged":[]}
["{//-----------------------------------------------------------------------------"]
["// "]
["// PURPOSE"]
["// "]
["// Krona is a flexible tool for exploring the relative proportions of"]
["// hierarchical data, such as metagenomic classifications, using a"]
["// radial, space-filling display. It is implemented using HTML5 and"]
["// JavaScript, allowing charts to be explored locally or served over the"]
["// Internet, requiring only a current version of any major web"]
["// browser. Krona charts can be created using an Excel template or from"]
["// common bioinformatic formats using the provided conversion scripts."]
["// "]
["// "]
["// COPYRIGHT LICENSE"]
["// "]
["// Copyright (c) 2011, Battelle National Biodefense Institute (BNBI);"]
["// all rights reserved. Authored by: Brian Ondov, Nicholas Bergman, and"]
["// Adam Phillippy"]
["// "]
["// This Software was prepared for the Department of Homeland Security"]
["// (DHS) by the Battelle National Biodefense Institute, LLC (BNBI) as"]
["// part of contract HSHQDC-07-C-00020 to manage and operate the National"]
["// Biodefense Analysis and Countermeasures Center (NBACC), a Federally"]
["// Funded Research and Development Center."]
["// "]
["// Redistribution and use in source and binary forms, with or without"]
["// modification, are permitted provided that the following conditions are"]
["// met:"]
["// "]
["// * Redistributions of source code must retain the above copyright"]
["//   notice, this list of conditions and the following disclaimer."]
["// "]
["// * Redistributions in binary form must reproduce the above copyright"]
["//   notice, this list of conditions and the following disclaimer in the"]
["//   documentation and/or other materials provided with the distribution."]
["// "]
["// * Neither the name of the Battelle National Biodefense Institute nor"]
["//   the names of its contributors may be used to endorse or promote"]
["//   products derived from this software without specific prior written"]
["//   permission."]
["// "]
["// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS"]
["// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT"]
["// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR"]
["// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT"]
["// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,"]
["// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT"]
["// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,"]
["// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY"]
["// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT"]
["// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE"]
["// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."]
["// "]
["// "]
["// TRADEMARK LICENSE"]
["// "]
["// KRONA(TM) is a trademark of the Department of Homeland Security, and use"]
["// of the trademark is subject to the following conditions:"]
["// "]
["// * Distribution of the unchanged, official code/software using the"]
["//   KRONA(TM) mark is hereby permitted by the Department of Homeland"]
["//   Security, provided that the software is distributed without charge"]
["//   and modification."]
["// "]
["// * Distribution of altered source code/software using the KRONA(TM) mark"]
["//   is not permitted unless written permission has been granted by the"]
["//   Department of Homeland Security."]
["// "]
["// "]
["// FOR MORE INFORMATION VISIT"]
["// "]
["// https://github.com/marbl/Krona/wiki/"]
["// "]
["//-----------------------------------------------------------------------------"]
["}"]
[]
[]
["var canvas;"]
["var context;"]
["var svg; // for snapshot mode"]
["var collapse = true;"]
["var collapseCheckBox;"]
["var collapseLast;"]
["var compress;"]
["var compressCheckBox;"]
["var maxAbsoluteDepthText;"]
["var maxAbsoluteDepthButtonDecrease;"]
["var maxAbsoluteDepthButtonIncrease;"]
["var fontSize = 11;"]
["var fontSizeText;"]
["var fontSizeButtonDecrease;"]
["var fontSizeButtonIncrease;"]
["var fontSizeLast;"]
["var radiusButtonDecrease;"]
["var radiusButtonIncrease;"]
["var shorten;"]
["var shortenCheckBox;"]
["var maxAbsoluteDepth;"]
["var backButton;"]
["var upButton;"]
["var forwardButton;"]
["var snapshotButton;"]
["var snapshotMode = false;"]
["var details;"]
["var detailsName;"]
["var search;"]
["var searchResults;"]
["var nSearchResults;"]
["var useHueCheckBox;"]
["var useHueDiv;"]
["var datasetDropDown;"]
["var datasetButtonLast;"]
["var datasetButtonPrev;"]
["var datasetButtonNext;"]
["var keyControl;"]
["var showKeys = true;"]
["var linkButton;"]
["var linkText;"]
["var frame;"]
[]
["// Node references. Note that the meanings of 'selected' and 'focused' are"]
["// swapped in the docs."]
["//"]
["var head; // the root of the entire tree"]
["var selectedNode = 0; // the root of the current view"]
["var focusNode = 0; // a node chosen for more info (single-click)"]
["var highlightedNode = 0; // mouse hover node"]
["var highlightingHidden = false;"]
["var nodes = new Array();"]
["var currentNodeID = 0; // to iterate while loading"]
[]
["var nodeHistory = new Array();"]
["var nodeHistoryPosition = 0;"]
[]
["var dataEnabled = false; // true when supplemental files are present"]
[]
["// store non-Krona GET variables so they can be passed on to links"]
["//"]
["var getVariables = new Array();"]
[]
["// selectedNodeLast is separate from the history, since we need to check"]
["// properties of the last node viewed when browsing through the history"]
["//"]
["var selectedNodeLast = 0;"]
["var zoomOut = false;"]
[]
["// temporary zoom-in while holding the mouse button on a wedge"]
["//"]
["var quickLook = false; // true when in quick look state"]
["var mouseDown = false;"]
["var mouseDownTime; // to detect mouse button hold"]
["var quickLookHoldLength = 200;"]
[]
["var imageWidth;"]
["var imageHeight;"]
["var centerX;"]
["var centerY;"]
["var gRadius;"]
["var updateViewNeeded = false;"]
[]
["// Determines the angle that the pie chart starts at.  90 degrees makes the"]
["// center label consistent with the children."]
["//"]
["var rotationOffset = Math.PI / 2;"]
[]
["var buffer;"]
["var bufferFactor = .1;"]
[]
["// The maps are the small pie charts showing the current slice being viewed."]
["//"]
["var mapBuffer = 10;"]
["var mapRadius = 0;"]
["var maxMapRadius = 25;"]
["var mapWidth = 150;"]
["var maxLabelOverhang = Math.PI * 4.18;"]
[]
["// Keys are the labeled boxes for slices in the highest level that are too thin"]
["// to label."]
["//"]
["var maxKeySizeFactor = 2; // will be multiplied by font size"]
["var keySize;"]
["var keys;"]
["var keyBuffer = 10;"]
["var currentKey;"]
["var keyMinTextLeft;"]
["var keyMinAngle;"]
[]
["var minRingWidthFactor = 5; // will be multiplied by font size"]
["var maxPossibleDepth; // the theoretical max that can be displayed"]
["var maxDisplayDepth; // the actual depth that will be displayed"]
["var headerHeight = 0;//document.getElementById('options').clientHeight;"]
["var historySpacingFactor = 1.6; // will be multiplied by font size"]
["var historyAlphaDelta = .25;"]
[]
["// appearance"]
["//"]
["var lineOpacity = 0.3;"]
["var saturation = 0.5;"]
["var lightnessBase = 0.6;"]
["var lightnessMax = .8;"]
["var thinLineWidth = .3;"]
["var highlightLineWidth = 1.5;"]
["var labelBoxBuffer = 6;"]
["var labelBoxRounding = 15;"]
["var labelWidthFudge = 1.05; // The width of unshortened labels are set slightly"]
["\t\t\t\t\t\t\t// longer than the name width so the animation"]
["\t\t\t\t\t\t\t// finishes faster."]
["var fontNormal;"]
["var fontBold;"]
["var fontFamily = 'sans-serif';"]
["//var fontFaceBold = 'bold Arial';"]
["var nodeRadius;"]
["var angleFactor;"]
["var tickLength;"]
["var compressedRadii;"]
[]
["// colors"]
["//"]
["var highlightFill = 'rgba(255, 255, 255, .3)';"]
["var colorUnclassified = 'rgb(220,220,220)';"]
[]
["// label staggering"]
["//"]
["var labelOffsets; // will store the current offset at each depth"]
["//"]
["// This will store pointers to the last node that had a label in each offset (or \"track\") of a"]
["// each depth.  These will be used to shorten neighboring labels that would overlap."]
["// The [nLabelNodes] index will store the last node with a radial label."]
["// labelFirstNodes is the same, but to check for going all the way around and"]
["// overlapping the first labels."]
["//"]
["var labelLastNodes;"]
["var labelFirstNodes;"]
["//"]
["var nLabelOffsets = 3; // the number of offsets to use"]
[]
["var mouseX = -1;"]
["var mouseY = -1;"]
["var mouseXRel = -1;"]
["var mouseYRel = -1;"]
[]
["// tweening"]
["//"]
["var progress = 0; // for tweening; goes from 0 to 1."]
["var progressLast = 0;"]
["var tweenFactor = 0; // progress converted by a curve for a smoother effect."]
["var tweenLength = 850; // in ms"]
["var tweenCurvature = 13;"]
["//"]
["// tweenMax is used to scale the sigmoid function so its range is [0,1] for the"]
["// domain [0,1]"]
["//"]
["var tweenMax = 1 / (1 + Math.exp(-tweenCurvature / 2));"]
["//"]
["var tweenStartTime;"]
[]
["// for framerate debug"]
["//"]
["var tweenFrames = 0;"]
["var fpsDisplay = document.getElementById('frameRate');"]
[]
["// Arrays to translate xml attribute names into displayable attribute names"]
["//"]
["var attributes = new Array();"]
["//"]
["var magnitudeIndex; // the index of attribute arrays used for magnitude"]
["var membersAssignedIndex;"]
["var membersSummaryIndex;"]
[]
["// For defining gradients"]
["//"]
["var hueDisplayName;"]
["var hueStopPositions;"]
["var hueStopHues;"]
["var hueStopText;"]
[]
["// multiple datasets"]
["//"]
["var currentDataset = 0;"]
["var lastDataset = 0;"]
["var datasets = 1;"]
["var datasetNames;"]
["var datasetSelectSize = 30;"]
["var datasetAlpha = new Tween(0, 0);"]
["var datasetWidths = new Array();"]
["var datasetChanged;"]
["var datasetSelectWidth = 50;"]
[]
["window.onload = load;"]
[]
["var image;"]
["var hiddenPattern;"]
["var loadingImage;"]
["var logoImage;"]
[]
["function backingScale()"]
["{"]
["\tif ('devicePixelRatio' in window)"]
["\t{"]
["\t\tif (window.devicePixelRatio > 1)"]
["\t\t{"]
["\t\t\treturn window.devicePixelRatio;"]
["\t\t}"]
["\t}"]
["\t"]
["\treturn 1;"]
["}"]
[]
["function resize()"]
["{"]
["\timageWidth = window.innerWidth;"]
["\timageHeight = window.innerHeight;"]
["\t"]
["\tif ( ! snapshotMode )"]
["\t{"]
["\t\tcontext.canvas.width = imageWidth * backingScale();"]
["\t\tcontext.canvas.height = imageHeight * backingScale();"]
["\t\tcontext.canvas.style.width = imageWidth + \"px\""]
["\t\tcontext.canvas.style.height = imageHeight + \"px\""]
["\t\tcontext.scale(backingScale(), backingScale());"]
["\t}"]
["\t"]
["\tif ( datasetDropDown )"]
["\t{"]
["\t\tvar ratio = "]
["\t\t\t(datasetDropDown.offsetTop + datasetDropDown.clientHeight) * 2 /"]
["\t\t\timageHeight;"]
["\t\t"]
["\t\tif ( ratio > 1 )"]
["\t\t{"]
["\t\t\tratio = 1;"]
["\t\t}"]
["\t\t"]
["\t\tratio = Math.sqrt(ratio);"]
["\t\t"]
["\t\tdatasetSelectWidth = "]
["\t\t\t(datasetDropDown.offsetLeft + datasetDropDown.clientWidth) * ratio;"]
["\t}"]
["\tvar leftMargin = datasets > 1 ? datasetSelectWidth + 30 : 0;"]
["\tvar minDimension = imageWidth - mapWidth - leftMargin > imageHeight ?"]
["\t\timageHeight :"]
["\t\timageWidth - mapWidth - leftMargin;"]
["\t"]
["\tmaxMapRadius = minDimension * .03;"]
["\tbuffer = minDimension * bufferFactor;"]
["\tmargin = minDimension * .015;"]
["\tcenterX = (imageWidth - mapWidth - leftMargin) / 2 + leftMargin;"]
["\tcenterY = imageHeight / 2;"]
["\tgRadius = minDimension / 2 - buffer;"]
["\t//context.font = '11px sans-serif';"]
["}"]
[]
["function handleResize()"]
["{"]
["\tupdateViewNeeded = true;"]
["}"]
[]
["function Attribute()"]
["{"]
["}"]
[]
["function Tween(start, end)"]
["{"]
["\tthis.start = start;"]
["\tthis.end = end;"]
["\tthis.current = this.start;"]
["\t"]
["\tthis.current = function()"]
["\t{"]
["\t\tif ( progress == 1 || this.start == this.end )"]
["\t\t{"]
["\t\t\treturn this.end;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn this.start + tweenFactor * (this.end - this.start);"]
["\t\t}"]
["\t};"]
["\t"]
["\tthis.setTarget = function(target)"]
["\t{"]
["\t\tthis.start = this.current();"]
["\t\tthis.end = target;"]
["\t}"]
["}"]
[]
["function Node()"]
["{"]
["\tthis.id = currentNodeID;"]
["\tcurrentNodeID++;"]
["\tnodes[this.id] = this;"]
["\t"]
["\tthis.angleStart = new Tween(Math.PI, 0);"]
["\tthis.angleEnd = new Tween(Math.PI, 0);"]
["\tthis.radiusInner = new Tween(1, 1);"]
["\tthis.labelRadius = new Tween(1, 1);"]
["\tthis.labelWidth = new Tween(0, 0);"]
["\tthis.scale = new Tween(1, 1); // TEMP"]
["\tthis.radiusOuter = new Tween(1, 1);"]
["\t"]
["\tthis.r = new Tween(255, 255);"]
["\tthis.g = new Tween(255, 255);"]
["\tthis.b = new Tween(255, 255);"]
["\t"]
["\tthis.alphaLabel = new Tween(0, 1);"]
["\tthis.alphaLine = new Tween(0, 1);"]
["\tthis.alphaArc = new Tween(0, 0);"]
["\tthis.alphaWedge = new Tween(0, 1);"]
["\tthis.alphaOther = new Tween(0, 1);"]
["\tthis.alphaPattern = new Tween(0, 0);"]
["\tthis.children = Array();"]
["\tthis.parent = 0;"]
["\t"]
["\tthis.attributes = new Array(attributes.length);"]
["\t"]
["\tthis.addChild = function(child)"]
["\t{"]
["\t\tthis.children.push(child);"]
["\t};"]
["\t"]
["\tthis.addLabelNode = function(depth, labelOffset)"]
["\t{"]
["\t\tif ( labelHeadNodes[depth][labelOffset] == 0 )"]
["\t\t{"]
["\t\t\t// this will become the head node for this list"]
["\t\t\t"]
["\t\t\tlabelHeadNodes[depth][labelOffset] = this;"]
["\t\t\tthis.labelPrev = this;"]
["\t\t}"]
["\t\t"]
["\t\tvar head = labelHeadNodes[depth][labelOffset];"]
["\t\t"]
["\t\tthis.labelNext = head;"]
["\t\tthis.labelPrev = head.labelPrev;"]
["\t\thead.labelPrev.labelNext = this;"]
["\t\thead.labelPrev = this;"]
["\t}"]
["\t"]
["\tthis.canDisplayDepth = function()"]
["\t{"]
["\t\t// whether this node is at a depth that can be displayed, according"]
["\t\t// to the max absolute depth"]
["\t\t"]
["\t\treturn this.depth <= maxAbsoluteDepth;"]
["\t}"]
["\t"]
["\tthis.canDisplayHistory = function()"]
["\t{"]
["\t\tvar radiusInner;"]
["\t\t"]
["\t\tif ( compress )"]
["\t\t{"]
["\t\t\tradiusInner = compressedRadii[0];"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tradiusInner = nodeRadius;"]
["\t\t}"]
["\t\t"]
["\t\treturn ("]
["\t\t\t-this.labelRadius.end * gRadius +"]
["\t\t\thistorySpacingFactor * fontSize / 2 <"]
["\t\t\tradiusInner * gRadius"]
["\t\t\t);"]
["\t}"]
["\t"]
["\tthis.canDisplayLabelCurrent = function()"]
["\t{"]
["\t\treturn ("]
["\t\t\t(this.angleEnd.current() - this.angleStart.current()) *"]
["\t\t\t(this.radiusInner.current() * gRadius + gRadius) >="]
["\t\t\tminWidth());"]
["\t}"]
["\t"]
["\tthis.checkHighlight = function()"]
["\t{"]
["\t\tif ( this.children.length == 0 && this == focusNode )"]
["\t\t{"]
["\t\t\t//return false;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.hide )"]
["\t\t{"]
["\t\t\treturn false;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.radiusInner.end == 1 )"]
["\t\t{"]
["\t\t\t// compressed to the outside; don't check"]
["\t\t\t"]
["\t\t\treturn false;"]
["\t\t}"]
["\t\t"]
["\t\tvar highlighted = false;"]
["\t\t"]
["\t\tvar angleStartCurrent = this.angleStart.current() + rotationOffset;"]
["\t\tvar angleEndCurrent = this.angleEnd.current() + rotationOffset;"]
["\t\tvar radiusInner = this.radiusInner.current() * gRadius;"]
["\t\t"]
["\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t{"]
["\t\t\thighlighted = this.children[i].checkHighlight();"]
["\t\t\t"]
["\t\t\tif ( highlighted )"]
["\t\t\t{"]
["\t\t\t\treturn true;"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.radial )"]
["\t\t{"]
["\t\t\tvar angleText = (angleStartCurrent + angleEndCurrent) / 2;"]
["\t\t\tvar radiusText = (gRadius + radiusInner) / 2;"]
["\t\t\t"]
["\t\t\tcontext.rotate(angleText);"]
["\t\t\tcontext.beginPath();"]
["\t\t\tcontext.moveTo(radiusText, -fontSize);"]
["\t\t\tcontext.lineTo(radiusText, fontSize);"]
["\t\t\tcontext.lineTo(radiusText + centerX, fontSize);"]
["\t\t\tcontext.lineTo(radiusText + centerX, -fontSize);"]
["\t\t\tcontext.closePath();"]
["\t\t\tcontext.rotate(-angleText);"]
["\t\t\t"]
["\t\t\tif ( context.isPointInPath(mouseXRel, mouseYRel) )"]
["\t\t\t{"]
["\t\t\t\tvar label = String(this.getPercentage()) + '%' + '   ' + this.name;"]
["\t\t\t\t"]
["\t\t\t\tif ( this.searchResultChildren() )"]
["\t\t\t    {"]
["\t\t\t\t\tlabel += searchResultString(this.searchResultChildren());"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif"]
["\t\t\t\t("]
["\t\t\t\t\tMath.sqrt((mouseXRel) * (mouseXRel) + (mouseYRel) * (mouseYRel)) / backingScale() <"]
["\t\t\t\t\tradiusText + measureText(label)"]
["\t\t\t\t)"]
["\t\t\t\t{"]
["\t\t\t\t\thighlighted = true;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t    for ( var i = 0; i < this.hiddenLabels.length; i++ )"]
["\t\t    {"]
["\t\t        var hiddenLabel = this.hiddenLabels[i];"]
["\t\t        "]
["\t\t\t\tcontext.rotate(hiddenLabel.angle);"]
["\t\t\t\tcontext.beginPath();"]
["\t\t\t\tcontext.moveTo(gRadius, -fontSize);"]
["\t\t\t\tcontext.lineTo(gRadius, fontSize);"]
["\t\t\t\tcontext.lineTo(gRadius + centerX, fontSize);"]
["\t\t\t\tcontext.lineTo(gRadius + centerX, -fontSize);"]
["\t\t\t\tcontext.closePath();"]
["\t\t\t\tcontext.rotate(-hiddenLabel.angle);"]
["\t\t\t\t"]
["\t\t\t\tif ( context.isPointInPath(mouseXRel, mouseYRel) )"]
["\t\t\t\t{"]
["\t\t\t\t\tvar label = String(hiddenLabel.value) + ' more';"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( hiddenLabel.search )"]
["\t\t\t\t    {"]
["\t\t\t\t\t\tlabel += searchResultString(hiddenLabel.search);"]
["\t\t\t\t\t}"]
["\t\t\t\t\t"]
["\t\t\t\t\tif"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tMath.sqrt((mouseXRel) * (mouseXRel) + (mouseYRel) * (mouseYRel)) / backingScale() <"]
["\t\t\t\t\t\tgRadius + fontSize + measureText(label)"]
["\t\t\t\t\t)"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\thighlighted = true;"]
["\t\t\t\t\t\tbreak;"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( ! highlighted && this != selectedNode && ! this.getCollapse() )"]
["\t\t{"]
["\t\t\tcontext.beginPath();"]
["\t\t\tcontext.arc(0, 0, radiusInner, angleStartCurrent, angleEndCurrent, false);"]
["\t\t\tcontext.arc(0, 0, gRadius, angleEndCurrent, angleStartCurrent, true);"]
["\t\t\tcontext.closePath();"]
["\t\t\t"]
["\t\t\tif ( context.isPointInPath(mouseXRel, mouseYRel) )"]
["\t\t\t{"]
["\t\t\t\thighlighted = true;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\t! highlighted &&"]
["\t\t\t\t(angleEndCurrent - angleStartCurrent) *"]
["\t\t\t\t(radiusInner + gRadius) <"]
["\t\t\t\tminWidth() &&"]
["\t\t\t\tthis.getDepth() == selectedNode.getDepth() + 1"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tif ( showKeys && this.checkHighlightKey() )"]
["\t\t\t\t{"]
["\t\t\t\t\thighlighted = true;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( highlighted )"]
["\t\t{"]
["\t\t\tif ( this != highlightedNode )"]
["\t\t\t{"]
["\t\t\t//\tdocument.body.style.cursor='pointer';"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\thighlightedNode = this;"]
["\t\t}"]
["\t\t"]
["\t\treturn highlighted;"]
["\t}"]
["\t"]
["\tthis.checkHighlightCenter = function()"]
["\t{"]
["\t\tif ( ! this.canDisplayHistory() )"]
["\t\t{"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tvar cx = centerX;"]
["\t\tvar cy = centerY - this.labelRadius.end * gRadius;"]
["\t\t//var dim = context.measureText(this.name);"]
["\t\t"]
["\t\tvar width = this.nameWidth;"]
["\t\t"]
["\t\tif ( this.searchResultChildren() )"]
["\t\t{"]
["\t\t\tvar results = searchResultString(this.searchResultChildren());"]
["\t\t\tvar dim = context.measureText(results);"]
["\t\t\twidth += dim.width;"]
["\t\t}"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\tmouseX > cx - width / 2 &&"]
["\t\t\tmouseX < cx + width / 2 &&"]
["\t\t\tmouseY > cy - historySpacingFactor * fontSize / 2 &&"]
["\t\t\tmouseY < cy + historySpacingFactor * fontSize / 2"]
["\t\t)"]
["\t\t{"]
["\t\t\thighlightedNode = this;"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.getParent() )"]
["\t\t{"]
["\t\t\tthis.getParent().checkHighlightCenter();"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.checkHighlightKey = function()"]
["\t{"]
["\t\tvar offset = keyOffset();"]
["\t\t"]
["\t\tvar xMin = imageWidth - keySize - margin - this.keyNameWidth - keyBuffer;"]
["\t\tvar xMax = imageWidth - margin;"]
["\t\tvar yMin = offset;"]
["\t\tvar yMax = offset + keySize;"]
["\t\t"]
["\t\tcurrentKey++;"]
["\t\t"]
["\t\treturn ("]
["\t\t\tmouseX > xMin &&"]
["\t\t\tmouseX < xMax &&"]
["\t\t\tmouseY > yMin &&"]
["\t\t\tmouseY < yMax);"]
["\t}"]
["\t"]
["\tthis.checkHighlightMap = function()"]
["\t{"]
["\t\tif ( this.parent )"]
["\t\t{"]
["\t\t\tthis.parent.checkHighlightMap();"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.getCollapse() || this == focusNode )"]
["\t\t{"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tvar box = this.getMapPosition();"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\tmouseX > box.x - mapRadius &&"]
["\t\t\tmouseX < box.x + mapRadius &&"]
["\t\t\tmouseY > box.y - mapRadius &&"]
["\t\t\tmouseY < box.y + mapRadius"]
["\t\t)"]
["\t\t{"]
["\t\t\thighlightedNode = this;"]
["\t\t}"]
["\t}"]
["\t"]
["/*\tthis.collapse = function()"]
["\t{"]
["\t\tfor (var i = 0; i < this.children.length; i++ )"]
["\t\t{"]
["\t\t\tthis.children[i] = this.children[i].collapse();"]
["\t\t}"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\tthis.children.length == 1 &&"]
["\t\t\tthis.children[0].magnitude == this.magnitude"]
["\t\t)"]
["\t\t{"]
["\t\t\tthis.children[0].parent = this.parent;"]
["\t\t\tthis.children[0].getDepth() = this.parent.getDepth() + 1;"]
["\t\t\treturn this.children[0];"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn this;"]
["\t\t}"]
["\t}"]
["*/\t"]
["\tthis.draw = function(labelMode, selected, searchHighlighted)"]
["\t{"]
["\t\tvar depth = this.getDepth() - selectedNode.getDepth() + 1;"]
["//\t\tvar hidden = false;"]
["\t\t"]
["\t\tif ( selectedNode == this )"]
["\t\t{"]
["\t\t\tselected = true;"]
["\t\t}"]
["\t\t"]
["\t\tvar angleStartCurrent = this.angleStart.current() + rotationOffset;"]
["\t\tvar angleEndCurrent = this.angleEnd.current() + rotationOffset;"]
["\t\tvar radiusInner = this.radiusInner.current() * gRadius;"]
["\t\tvar canDisplayLabelCurrent = this.canDisplayLabelCurrent();"]
["\t\tvar hiddenSearchResults = false;"]
["\t\t"]
["/*\t\tif ( ! this.hide )"]
["\t\t{"]
["\t\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t\t{"]
["\t\t\t\tif ( this.children[i].hide && this.children[i].searchResults )"]
["\t\t\t\t{"]
["\t\t\t\t\thiddenSearchResults = true;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["*/\t\t"]
["\t\tvar drawChildren ="]
["\t\t\t( ! this.hide || ! this.hidePrev && progress < 1 ) &&"]
["\t\t\t( ! this.hideAlone || ! this.hideAlonePrev && progress < 1 );"]
["\t\t"]
["//\t\tif ( this.alphaWedge.current() > 0 || this.alphaLabel.current() > 0 )"]
["\t\t{"]
["\t\t\tvar lastChildAngleEnd = angleStartCurrent;"]
["\t\t\t"]
["\t\t\tif ( this.hasChildren() )//canDisplayChildren )"]
["\t\t\t{"]
["\t\t\t\tlastChildAngleEnd ="]
["\t\t\t\t\tthis.children[this.children.length - 1].angleEnd.current()"]
["\t\t\t\t\t+ rotationOffset;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( labelMode )"]
["\t\t\t{"]
["\t\t\t\tvar drawRadial ="]
["\t\t\t\t!("]
["\t\t\t\t\tthis.parent &&"]
["\t\t\t\t\tthis.parent != selectedNode &&"]
["\t\t\t\t\tangleEndCurrent == this.parent.angleEnd.current() + rotationOffset"]
["\t\t\t\t);"]
["\t\t\t\t"]
["\t\t\t\t//if ( angleStartCurrent != angleEndCurrent )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.drawLines(angleStartCurrent, angleEndCurrent, radiusInner, drawRadial, selected);"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tvar alphaOtherCurrent = this.alphaOther.current();"]
["\t\t\t\tvar childRadiusInner;"]
["\t\t\t\t"]
["\t\t\t\tif ( this == selectedNode || alphaOtherCurrent )"]
["\t\t\t\t{"]
["\t\t\t\t\tchildRadiusInner ="]
["\t\t\t\t\t\tthis.children.length ?"]
["\t\t\t\t\t\t\tthis.children[this.children.length - 1].radiusInner.current() * gRadius"]
["\t\t\t\t\t\t: radiusInner"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif ( this == selectedNode )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.drawReferenceRings(childRadiusInner);"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif"]
["\t\t\t\t("]
["\t\t\t\t\tselected &&"]
["\t\t\t\t\t! searchHighlighted &&"]
["\t\t\t\t\tthis != selectedNode &&"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tthis.isSearchResult ||"]
["\t\t\t\t\t\tthis.hideAlone && this.searchResultChildren() ||"]
["\t\t\t\t\t\tfalse"]
["//\t\t\t\t\t\tthis.hide &&"]
["//\t\t\t\t\t\tthis.containsSearchResult"]
["\t\t\t\t\t)"]
["\t\t\t\t)"]
["\t\t\t\t{"]
["\t\t\t\t\tcontext.globalAlpha = this.alphaWedge.current();"]
["\t\t\t\t\t"]
["\t\t\t\t\tdrawWedge"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tangleStartCurrent,"]
["\t\t\t\t\t\tangleEndCurrent,"]
["\t\t\t\t\t\tradiusInner,"]
["\t\t\t\t\t\tgRadius,"]
["\t\t\t\t\t\thighlightFill,"]
["\t\t\t\t\t\t0,"]
["\t\t\t\t\t\ttrue"]
["\t\t\t\t\t);"]
["\t\t\t\t\t"]
["\t\t\t\t\tif"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tthis.keyed &&"]
["\t\t\t\t\t\t! showKeys &&"]
["\t\t\t\t\t\tthis.searchResults &&"]
["\t\t\t\t\t\t! searchHighlighted &&"]
["\t\t\t\t\t\tthis != highlightedNode &&"]
["\t\t\t\t\t\tthis != focusNode"]
["\t\t\t\t\t)"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tvar angle = (angleEndCurrent + angleStartCurrent) / 2;"]
["\t\t\t\t\t\tthis.drawLabel(angle, true, false, true, true);"]
["\t\t\t\t\t}"]
["\t\t\t\t\t"]
["\t\t\t\t\t//this.drawHighlight(false);"]
["\t\t\t\t\tsearchHighlighted = true;"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif"]
["\t\t\t\t("]
["\t\t\t\t\tthis == selectedNode ||"]
["//\t\t\t\t\ttrue"]
["\t\t\t\t\t//(canDisplayLabelCurrent) &&"]
["\t\t\t\t\tthis != highlightedNode &&"]
["\t\t\t\t\tthis != focusNode"]
["\t\t\t\t)"]
["\t\t\t\t{"]
["\t\t\t\t\tif ( this.radial != this.radialPrev && this.alphaLabel.end == 1 )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tcontext.globalAlpha = tweenFactor;"]
["\t\t\t\t\t}"]
["\t\t\t\t\telse"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tcontext.globalAlpha = this.alphaLabel.current();"]
["\t\t\t\t\t}"]
["\t\t\t\t\t"]
["\t\t\t\t\tthis.drawLabel"]
["\t\t\t\t\t("]
["\t\t\t\t\t\t(angleStartCurrent + angleEndCurrent) / 2,"]
["\t\t\t\t\t\tthis.hideAlone && this.searchResultChildren() ||"]
["\t\t\t\t\t\t(this.isSearchResult || hiddenSearchResults) && selected,"]
["\t\t\t\t\t\tthis == selectedNode && ! this.radial,"]
["\t\t\t\t\t\tselected,"]
["\t\t\t\t\t\tthis.radial"]
["\t\t\t\t\t);"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( this.radial != this.radialPrev && this.alphaLabel.start == 1 && progress < 1 )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tcontext.globalAlpha = 1 - tweenFactor;"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tthis.drawLabel"]
["\t\t\t\t\t\t("]
["\t\t\t\t\t\t\t(angleStartCurrent + angleEndCurrent) / 2,"]
["\t\t\t\t\t\t\t(this.isSearchResult || hiddenSearchResults) && selected,"]
["\t\t\t\t\t\t\tthis == selectedNodeLast && ! this.radialPrev,"]
["\t\t\t\t\t\t\tselected,"]
["\t\t\t\t\t\t\tthis.radialPrev"]
["\t\t\t\t\t\t);"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif"]
["\t\t\t\t("]
["\t\t\t\t\talphaOtherCurrent &&"]
["\t\t\t\t\tlastChildAngleEnd != null"]
["\t\t\t\t)"]
["\t\t\t\t{"]
["\t\t\t\t\tif"]
["\t\t\t\t\t("]
["\t\t\t\t\t\t(angleEndCurrent - lastChildAngleEnd) *"]
["\t\t\t\t\t\t(childRadiusInner + gRadius) >="]
["\t\t\t\t\t\tminWidth()"]
["\t\t\t\t\t)"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\t//context.font = fontNormal;"]
["\t\t\t\t\t\tcontext.globalAlpha = this.alphaOther.current();"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tdrawTextPolar"]
["\t\t\t\t\t\t("]
["\t\t\t\t\t\t\tthis.getUnclassifiedText(),"]
["\t\t\t\t\t\t\tthis.getUnclassifiedPercentage(),"]
["\t\t\t\t\t\t\t(lastChildAngleEnd + angleEndCurrent) / 2,"]
["\t\t\t\t\t\t\t(childRadiusInner + gRadius) / 2,"]
["\t\t\t\t\t\t\ttrue,"]
["\t\t\t\t\t\t\tfalse,"]
["\t\t\t\t\t\t\tfalse,"]
["\t\t\t\t\t\t\t0,"]
["\t\t\t\t\t\t\t0"]
["\t\t\t\t\t\t);"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif ( this == selectedNode && this.keyUnclassified && showKeys )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.drawKey"]
["\t\t\t\t\t("]
["\t\t\t\t\t\t(lastChildAngleEnd + angleEndCurrent) / 2,"]
["\t\t\t\t\t\tfalse,"]
["\t\t\t\t\t\tfalse"]
["\t\t\t\t\t);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tvar alphaWedgeCurrent = this.alphaWedge.current();"]
["\t\t\t\t"]
["\t\t\t\tif ( alphaWedgeCurrent || this.alphaOther.current() )"]
["\t\t\t\t{"]
["\t\t\t\t\tvar currentR = this.r.current();"]
["\t\t\t\t\tvar currentG = this.g.current();"]
["\t\t\t\t\tvar currentB = this.b.current();"]
["\t\t\t\t\t\t"]
["\t\t\t\t\tvar fill = rgbText(currentR, currentG, currentB);"]
["\t\t\t\t\t"]
["\t\t\t\t\tvar radiusOuter;"]
["\t\t\t\t\tvar lastChildAngle;"]
["\t\t\t\t\tvar truncateWedge ="]
["\t\t\t\t\t("]
["\t\t\t\t\t\t(this.hasChildren() || this == selectedNode ) &&"]
["\t\t\t\t\t\t! this.keyed &&"]
["\t\t\t\t\t\t(compress || depth < maxDisplayDepth) &&"]
["\t\t\t\t\t\tdrawChildren"]
["\t\t\t\t\t);"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( truncateWedge )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tradiusOuter = this.children.length ? this.children[0].radiusInner.current() * gRadius : radiusInner;"]
["\t\t\t\t\t}"]
["\t\t\t\t\telse"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tradiusOuter = gRadius;"]
["\t\t\t\t\t}"]
["\t\t\t\t\t/*"]
["\t\t\t\t\tif ( this.hasChildren() )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tradiusOuter = this.children[0].getUncollapsed().radiusInner.current() * gRadius + 1;"]
["\t\t\t\t\t}"]
["\t\t\t\t\telse"]
["\t\t\t\t\t{ // TEMP"]
["\t\t\t\t\t\tradiusOuter = radiusInner + nodeRadius * gRadius;"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( radiusOuter > gRadius )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tradiusOuter = gRadius;"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t}"]
["\t\t\t\t\t*/"]
["\t\t\t\t\tcontext.globalAlpha = alphaWedgeCurrent;"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( radiusInner != radiusOuter || truncateWedge )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tdrawWedge"]
["\t\t\t\t\t\t("]
["\t\t\t\t\t\t\tangleStartCurrent,"]
["\t\t\t\t\t\t\tangleEndCurrent,"]
["\t\t\t\t\t\t\tradiusInner,"]
["\t\t\t\t\t\t\tradiusOuter,//this.radiusOuter.current() * gRadius,"]
["\t\t\t\t\t\t\t//'rgba(0, 200, 0, .1)',"]
["\t\t\t\t\t\t\tfill,"]
["\t\t\t\t\t\t\tthis.alphaPattern.current()"]
["\t\t\t\t\t\t);"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( truncateWedge )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\t// fill in the extra space if the sum of our childrens'"]
["\t\t\t\t\t\t\t// magnitudes is less than ours"]
["\t\t\t\t\t\t\t"]
["\t\t\t\t\t\t\tif ( lastChildAngleEnd < angleEndCurrent )//&& false) // TEMP"]
["\t\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\t\tif ( radiusOuter > 1 )"]
["\t\t\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\t\t\t// overlap slightly to hide the seam"]
["\t\t\t\t\t\t\t\t\t"]
["\t//\t\t\t\t\t\t\t\tradiusOuter -= 1;"]
["\t\t\t\t\t\t\t\t}"]
["\t\t\t\t\t\t\t\t"]
["\t\t\t\t\t\t\t\tif ( alphaWedgeCurrent < 1 )"]
["\t\t\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\t\t\tcontext.globalAlpha = this.alphaOther.current();"]
["\t\t\t\t\t\t\t\t\tdrawWedge"]
["\t\t\t\t\t\t\t\t\t("]
["\t\t\t\t\t\t\t\t\t\tlastChildAngleEnd,"]
["\t\t\t\t\t\t\t\t\t\tangleEndCurrent,"]
["\t\t\t\t\t\t\t\t\t\tradiusOuter,"]
["\t\t\t\t\t\t\t\t\t\tgRadius,"]
["\t\t\t\t\t\t\t\t\t\tcolorUnclassified,"]
["\t\t\t\t\t\t\t\t\t\t0"]
["\t\t\t\t\t\t\t\t\t);"]
["\t\t\t\t\t\t\t\t\tcontext.globalAlpha = alphaWedgeCurrent;"]
["\t\t\t\t\t\t\t\t}"]
["\t\t\t\t\t\t\t\t"]
["\t\t\t\t\t\t\t\tdrawWedge"]
["\t\t\t\t\t\t\t\t("]
["\t\t\t\t\t\t\t\t\tlastChildAngleEnd,"]
["\t\t\t\t\t\t\t\t\tangleEndCurrent,"]
["\t\t\t\t\t\t\t\t\tradiusOuter,"]
["\t\t\t\t\t\t\t\t\tgRadius,//this.radiusOuter.current() * gRadius,"]
["\t\t\t\t\t\t\t\t\t//'rgba(200, 0, 0, .1)',"]
["\t\t\t\t\t\t\t\t\tfill,"]
["\t\t\t\t\t\t\t\t\tthis.alphaPattern.current()"]
["\t\t\t\t\t\t\t\t);"]
["\t\t\t\t\t\t\t}"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( radiusOuter < gRadius )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\t// patch up the seam"]
["\t\t\t\t\t\t\t//"]
["\t\t\t\t\t\t\tcontext.beginPath();"]
["\t\t\t\t\t\t\tcontext.arc(0, 0, radiusOuter, angleStartCurrent/*lastChildAngleEnd*/, angleEndCurrent, false);"]
["\t\t\t\t\t\t\tcontext.strokeStyle = fill;"]
["\t\t\t\t\t\t\tcontext.lineWidth = 1;"]
["\t\t\t\t\t\t\tcontext.stroke();"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t}"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( this.keyed && selected && showKeys )//&& progress == 1 )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tthis.drawKey"]
["\t\t\t\t\t\t("]
["\t\t\t\t\t\t\t(angleStartCurrent + angleEndCurrent) / 2,"]
["\t\t\t\t\t\t\t("]
["\t\t\t\t\t\t\t\tthis == highlightedNode ||"]
["\t\t\t\t\t\t\t\tthis == focusNode ||"]
["\t\t\t\t\t\t\t\tthis.searchResults"]
["\t\t\t\t\t\t\t),"]
["\t\t\t\t\t\t\tthis == highlightedNode || this == focusNode"]
["\t\t\t\t\t\t);"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tthis.hiddenLabels = Array();"]
["\t\t"]
["\t\tif ( drawChildren )"]
["\t\t{"]
["\t\t\t// draw children"]
["\t\t\t//"]
["\t\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t\t{"]
["\t\t\t\tif ( this.drawHiddenChildren(i, selected, labelMode, searchHighlighted) )"]
["\t\t\t\t{"]
["\t\t\t\t\ti = this.children[i].hiddenEnd;"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.children[i].draw(labelMode, selected, searchHighlighted);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t};"]
["\t"]
["\tthis.drawHiddenChildren = function"]
["\t("]
["\t\tfirstHiddenChild,"]
["\t\tselected,"]
["\t\tlabelMode,"]
["\t\tsearchHighlighted"]
["\t)"]
["\t{"]
["\t\tvar firstChild = this.children[firstHiddenChild];"]
["\t\t"]
["\t\tif ( firstChild.hiddenEnd == null || firstChild.radiusInner.current() == 1 )"]
["\t\t{"]
["\t\t\treturn false;"]
["\t\t}"]
["\t\t"]
["\t\tfor ( var i = firstHiddenChild; i < firstChild.hiddenEnd; i++ )"]
["\t\t{"]
["\t\t\tif ( ! this.children[i].hide || ! this.children[i].hidePrev && progress < 1 )"]
["\t\t\t{"]
["\t\t\t\treturn false;"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tvar angleStart = firstChild.angleStart.current() + rotationOffset;"]
["\t\tvar lastChild = this.children[firstChild.hiddenEnd];"]
["\t\tvar angleEnd = lastChild.angleEnd.current() + rotationOffset;"]
["\t\tvar radiusInner = gRadius * firstChild.radiusInner.current();"]
["\t\tvar hiddenChildren = firstChild.hiddenEnd - firstHiddenChild + 1;"]
["\t\t"]
["\t\tif ( labelMode )"]
["\t\t{"]
["\t\t\tvar hiddenSearchResults = 0;"]
["\t\t\t"]
["\t\t\tfor ( var i = firstHiddenChild; i <= firstChild.hiddenEnd; i++ )"]
["\t\t\t{"]
["\t\t\t\thiddenSearchResults += this.children[i].searchResults;"]
["\t\t\t\t"]
["\t\t\t\tif ( this.children[i].magnitude == 0 )"]
["\t\t\t\t{"]
["\t\t\t\t\thiddenChildren--;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\tselected &&"]
["\t\t\t\t(angleEnd - angleStart) * "]
["\t\t\t\t(gRadius + gRadius) >="]
["\t\t\t\tminWidth() ||"]
["\t\t\t\tthis == highlightedNode &&"]
["\t\t\t\thiddenChildren ||"]
["\t\t\t\thiddenSearchResults"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tcontext.globalAlpha = this.alphaWedge.current();"]
["\t\t\t\t"]
["\t\t\t\tthis.drawHiddenLabel"]
["\t\t\t\t("]
["\t\t\t\t\tangleStart,"]
["\t\t\t\t\tangleEnd,"]
["\t\t\t\t\thiddenChildren,"]
["\t\t\t\t\thiddenSearchResults"]
["\t\t\t\t);"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tvar drawWedges = true;"]
["\t\t"]
["\t\tfor ( var i = firstHiddenChild; i <= firstChild.hiddenEnd; i++ )"]
["\t\t{"]
["\t\t\t// all hidden children must be completely hidden to draw together"]
["\t\t\t"]
["\t\t\tif ( this.children[i].alphaPattern.current() != this.children[i].alphaWedge.current() )"]
["\t\t\t{"]
["\t\t\t\tdrawWedges = false;"]
["\t\t\t\tbreak;"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( labelMode )"]
["\t\t{"]
["\t\t\tif ( drawWedges )"]
["\t\t\t{"]
["\t\t\t\tvar drawRadial = (angleEnd < this.angleEnd.current() + rotationOffset);"]
["\t\t\t\tthis.drawLines(angleStart, angleEnd, radiusInner, drawRadial);"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( hiddenSearchResults && ! searchHighlighted )"]
["\t\t\t{"]
["\t\t\t\tdrawWedge"]
["\t\t\t\t("]
["\t\t\t\t\tangleStart,"]
["\t\t\t\t\tangleEnd,"]
["\t\t\t\t\tradiusInner,"]
["\t\t\t\t\tgRadius,//this.radiusOuter.current() * gRadius,"]
["\t\t\t\t\thighlightFill,"]
["\t\t\t\t\t0,"]
["\t\t\t\t\ttrue"]
["\t\t\t\t);"]
["\t\t\t}"]
["\t\t}"]
["\t\telse if ( drawWedges )"]
["\t\t{"]
["\t\t\tcontext.globalAlpha = this.alphaWedge.current();"]
["\t\t\t"]
["\t\t\tvar fill = rgbText"]
["\t\t\t("]
["\t\t\t\tfirstChild.r.current(),"]
["\t\t\t\tfirstChild.g.current(),"]
["\t\t\t\tfirstChild.b.current()"]
["\t\t\t);"]
["\t\t\t"]
["\t\t\tdrawWedge"]
["\t\t\t("]
["\t\t\t\tangleStart,"]
["\t\t\t\tangleEnd,"]
["\t\t\t\tradiusInner,"]
["\t\t\t\tgRadius,//this.radiusOuter.current() * gRadius,"]
["\t\t\t\tfill,"]
["\t\t\t\tcontext.globalAlpha,"]
["\t\t\t\tfalse"]
["\t\t\t);"]
["\t\t}"]
["\t\t"]
["\t\treturn drawWedges;"]
["\t}"]
["\t"]
["\tthis.drawHiddenLabel = function(angleStart, angleEnd, value, hiddenSearchResults)"]
["\t{"]
["\t\tvar textAngle = (angleStart + angleEnd) / 2;"]
["\t\tvar labelRadius = gRadius + fontSize;//(radiusInner + radius) / 2;"]
["\t\t"]
["\t\tvar hiddenLabel = Array();"]
["\t\t"]
["\t\thiddenLabel.value = value;"]
["\t\thiddenLabel.angle = textAngle;"]
["\t\thiddenLabel.search = hiddenSearchResults;"]
["\t\t"]
["\t\tthis.hiddenLabels.push(hiddenLabel);"]
["\t\t"]
["\t\tdrawTick(gRadius - fontSize * .75, fontSize * 1.5, textAngle);"]
["\t\tdrawTextPolar"]
["\t\t("]
["\t\t\tvalue.toString() + ' more',"]
["\t\t\t0, // inner text"]
["\t\t\ttextAngle,"]
["\t\t\tlabelRadius,"]
["\t\t\ttrue, // radial"]
["\t\t\thiddenSearchResults, // bubble"]
["\t\t\tthis == highlightedNode || this == focusNode, // bold"]
["\t\t\tfalse,"]
["\t\t\thiddenSearchResults"]
["\t\t);"]
["\t}"]
["\t"]
["\tthis.drawHighlight = function(bold)"]
["\t{"]
["\t\tvar angleStartCurrent = this.angleStart.current() + rotationOffset;"]
["\t\tvar angleEndCurrent = this.angleEnd.current() + rotationOffset;"]
["\t\tvar radiusInner = this.radiusInner.current() * gRadius;"]
["\t\t"]
["\t\t//this.setHighlightStyle();"]
["\t\t"]
["\t\tif ( this == focusNode && this == highlightedNode && this.hasChildren() )"]
["\t\t{"]
["//\t\t\tcontext.fillStyle = \"rgba(255, 255, 255, .3)\";"]
["\t\t\tarrow"]
["\t\t\t("]
["\t\t\t\tangleStartCurrent,"]
["\t\t\t\tangleEndCurrent,"]
["\t\t\t\tradiusInner"]
["\t\t\t);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tdrawWedge"]
["\t\t\t("]
["\t\t\t\tangleStartCurrent,"]
["\t\t\t\tangleEndCurrent,"]
["\t\t\t\tradiusInner,"]
["\t\t\t\tgRadius,"]
["\t\t\t\thighlightFill,"]
["\t\t\t\t0,"]
["\t\t\t\ttrue"]
["\t\t\t);"]
["\t\t}"]
["\t\t"]
["\t\t// check if hidden children should be highlighted"]
["\t\t//"]
["\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t{"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\tthis.children[i].getDepth() - selectedNode.getDepth() + 1 <="]
["\t\t\t\tmaxDisplayDepth &&"]
["\t\t\t\tthis.children[i].hiddenEnd != null"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tvar firstChild = this.children[i];"]
["\t\t\t\tvar lastChild = this.children[firstChild.hiddenEnd];"]
["\t\t\t\tvar hiddenAngleStart = firstChild.angleStart.current() + rotationOffset;"]
["\t\t\t\tvar hiddenAngleEnd = lastChild.angleEnd.current() + rotationOffset;"]
["\t\t\t\tvar hiddenRadiusInner = gRadius * firstChild.radiusInner.current();"]
["\t\t\t\t"]
["\t\t\t\tdrawWedge"]
["\t\t\t\t("]
["\t\t\t\t\thiddenAngleStart,"]
["\t\t\t\t\thiddenAngleEnd,"]
["\t\t\t\t\thiddenRadiusInner,"]
["\t\t\t\t\tgRadius,"]
["\t\t\t\t\t'rgba(255, 255, 255, .3)',"]
["\t\t\t\t\t0,"]
["\t\t\t\t\ttrue"]
["\t\t\t\t);"]
["\t\t\t\t"]
["\t\t\t\tif ( false && ! this.searchResults )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.drawHiddenLabel"]
["\t\t\t\t\t("]
["\t\t\t\t\t\thiddenAngleStart,"]
["\t\t\t\t\t\thiddenAngleEnd,"]
["\t\t\t\t\t\tfirstChild.hiddenEnd - i + 1"]
["\t\t\t\t\t);"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\ti = firstChild.hiddenEnd;"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["//\t\t\tcontext.strokeStyle = 'black';"]
["\t\tcontext.fillStyle = 'black';"]
["\t\t"]
["\t\tvar highlight = ! ( progress < 1 && zoomOut && this == selectedNodeLast );"]
["\t\t"]
["\t\tvar angle = (angleEndCurrent + angleStartCurrent) / 2;"]
["\t\t"]
["\t\tif ( ! (this.keyed && showKeys) )"]
["\t\t{"]
["\t\t\tthis.drawLabel(angle, true, bold, true, this.radial);"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.drawHighlightCenter = function()"]
["\t{"]
["\t\tif ( ! this.canDisplayHistory() )"]
["\t\t{"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tcontext.lineWidth = highlightLineWidth;"]
["\t\tcontext.strokeStyle = 'black';"]
["\t\tcontext.fillStyle = \"rgba(255, 255, 255, .6)\";"]
["\t\t"]
["\t\tcontext.fillStyle = 'black';"]
["\t\tthis.drawLabel(3 * Math.PI / 2, true, true, false);"]
["\t\tcontext.font = fontNormal;"]
["\t}"]
["\t"]
["\tthis.drawKey = function(angle, highlight, bold)"]
["\t{"]
["\t\tvar offset = keyOffset();"]
["\t\tvar color;"]
["\t\tvar colorText = this.magnitude == 0 ? 'gray' : 'black';"]
["\t\tvar patternAlpha = this.alphaPattern.end;"]
["\t\tvar boxLeft = imageWidth - keySize - margin;"]
["\t\tvar textY = offset + keySize / 2;"]
["\t\t"]
["\t\tvar label;"]
["\t\tvar keyNameWidth;"]
["\t\t"]
["\t\tif ( this == selectedNode )"]
["\t\t{"]
["\t\t\tcolor = colorUnclassified;"]
["\t\t\tlabel ="]
["\t\t\t\tthis.getUnclassifiedText() +"]
["\t\t\t\t'   ' +"]
["\t\t\t\tthis.getUnclassifiedPercentage();"]
["\t\t\tkeyNameWidth = measureText(label, false);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tlabel = this.keyLabel;"]
["\t\t\tcolor = rgbText(this.r.end, this.g.end, this.b.end);"]
["\t\t\t"]
["\t\t\tif ( highlight )"]
["\t\t\t{"]
["\t\t\t\tif ( this.searchResultChildren() )"]
["\t\t\t\t{"]
["\t\t\t\t\tlabel = label + searchResultString(this.searchResultChildren());"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tkeyNameWidth = measureText(label, bold);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tkeyNameWidth = this.keyNameWidth;"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tvar textLeft = boxLeft - keyBuffer - keyNameWidth - fontSize / 2;"]
["\t\tvar labelLeft = textLeft;"]
["\t\t"]
["\t\tif ( labelLeft > keyMinTextLeft - fontSize / 2 )"]
["\t\t{"]
["\t\t\tkeyMinTextLeft -= fontSize / 2;"]
["\t\t\t"]
["\t\t\tif ( keyMinTextLeft < centerX - gRadius + fontSize / 2 )"]
["\t\t\t{"]
["\t\t\t\tkeyMinTextLeft = centerX - gRadius + fontSize / 2;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tlabelLeft = keyMinTextLeft;"]
["\t\t}"]
["\t\t"]
["\t\tvar lineX = new Array();"]
["\t\tvar lineY = new Array();"]
["\t\t"]
["\t\tvar bendRadius;"]
["\t\tvar keyAngle = Math.atan((textY - centerY) / (labelLeft - centerX));"]
["\t\tvar arcAngle;"]
["\t\t"]
["\t\tif ( keyAngle < 0 )"]
["\t\t{"]
["\t\t\tkeyAngle += Math.PI;"]
["\t\t}"]
["\t\t"]
["\t\tif ( keyMinAngle == 0 || angle < keyMinAngle )"]
["\t\t{"]
["\t\t\tkeyMinAngle = angle;"]
["\t\t}"]
["\t\t"]
["\t\tif ( angle > Math.PI && keyMinAngle > Math.PI )"]
["\t\t{"]
["\t\t\t// allow lines to come underneath the chart"]
["\t\t\t"]
["\t\t\tangle -= Math.PI * 2;"]
["\t\t}"]
["\t\t"]
["\t\tlineX.push(Math.cos(angle) * gRadius);"]
["\t\tlineY.push(Math.sin(angle) * gRadius);"]
["\t\t"]
["\t\tif ( angle < keyAngle && textY > centerY + Math.sin(angle) * (gRadius + buffer * (currentKey - 1) / (keys + 1) / 2 + buffer / 2) )"]
["\t\t{"]
["\t\t\tbendRadius = gRadius + buffer - buffer * currentKey / (keys + 1) / 2;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tbendRadius = gRadius + buffer * currentKey / (keys + 1) / 2 + buffer / 2;"]
["\t\t}"]
["\t\t"]
["\t\tvar outside ="]
["\t\t\tMath.sqrt"]
["\t\t\t("]
["\t\t\t\tMath.pow(labelLeft - centerX, 2) +"]
["\t\t\t\tMath.pow(textY - centerY, 2)"]
["\t\t\t) > bendRadius;"]
["\t\t"]
["\t\tif ( ! outside )"]
["\t\t{"]
["\t\t\tarcAngle = Math.asin((textY - centerY) / bendRadius);"]
["\t\t\t"]
["\t\t\tkeyMinTextLeft = min(keyMinTextLeft, centerX + bendRadius * Math.cos(arcAngle) - fontSize / 2);"]
["\t\t\t"]
["\t\t\tif ( labelLeft < textLeft && textLeft > centerX + bendRadius * Math.cos(arcAngle) )"]
["\t\t\t{"]
["\t\t\t\tlineX.push(textLeft - centerX);"]
["\t\t\t\tlineY.push(textY - centerY);"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tkeyMinTextLeft = min(keyMinTextLeft, labelLeft - fontSize / 2);"]
["\t\t\t"]
["\t\t\tif ( angle < keyAngle )"]
["\t\t\t{"]
["\t\t\t\t// flip everything over y = x"]
["\t\t\t\t//"]
["\t\t\t\tarcAngle = Math.PI / 2 - keyLineAngle"]
["\t\t\t\t("]
["\t\t\t\t\tMath.PI / 2 - angle,"]
["\t\t\t\t\tMath.PI / 2 - keyAngle,"]
["\t\t\t\t\tbendRadius,"]
["\t\t\t\t\ttextY - centerY,"]
["\t\t\t\t\tlabelLeft - centerX,"]
["\t\t\t\t\tlineY,"]
["\t\t\t\t\tlineX"]
["\t\t\t\t);"]
["\t\t\t\t"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tarcAngle = keyLineAngle"]
["\t\t\t\t("]
["\t\t\t\t\tangle,"]
["\t\t\t\t\tkeyAngle,"]
["\t\t\t\t\tbendRadius,"]
["\t\t\t\t\tlabelLeft - centerX,"]
["\t\t\t\t\ttextY - centerY,"]
["\t\t\t\t\tlineX,"]
["\t\t\t\t\tlineY"]
["\t\t\t\t);"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( labelLeft > centerX + bendRadius * Math.cos(arcAngle) ||"]
["\t\ttextY > centerY + bendRadius * Math.sin(arcAngle) + .01)"]
["//\t\tif ( outside ||  )"]
["\t\t{"]
["\t\t\tlineX.push(labelLeft - centerX);"]
["\t\t\tlineY.push(textY - centerY);"]
["\t\t\t"]
["\t\t\tif ( textLeft != labelLeft )"]
["\t\t\t{"]
["\t\t\t\tlineX.push(textLeft - centerX);"]
["\t\t\t\tlineY.push(textY - centerY);"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tcontext.globalAlpha = this.alphaWedge.current();"]
["\t\t"]
["\t\tif ( snapshotMode )"]
["\t\t{"]
["\t\t\tvar labelSVG;"]
["\t\t\t"]
["\t\t\tif ( this == selectedNode )"]
["\t\t\t{"]
["\t\t\t\tlabelSVG ="]
["\t\t\t\t\tthis.getUnclassifiedText() +"]
["\t\t\t\t\tspacer() +"]
["\t\t\t\t\tthis.getUnclassifiedPercentage();"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tlabelSVG = this.name + spacer() + this.getPercentage() + '%';"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tsvg +="]
["\t\t\t\t'<rect fill=\"' + color + '\" ' +"]
["\t\t\t\t'x=\"' + boxLeft + '\" y=\"' + offset +"]
["\t\t\t\t'\" width=\"' + keySize + '\" height=\"' + keySize + '\"/>';"]
["\t\t\t"]
["\t\t\tif ( patternAlpha )"]
["\t\t\t{"]
["\t\t\t\tsvg +="]
["\t\t\t\t\t'<rect fill=\"url(#hiddenPattern)\" style=\"stroke:none\" ' +"]
["\t\t\t\t\t'x=\"' + boxLeft + '\" y=\"' + offset +"]
["\t\t\t\t\t'\" width=\"' + keySize + '\" height=\"' + keySize + '\"/>';"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tsvg +="]
["\t\t\t\t'<path class=\"line' +"]
["\t\t\t\t(highlight ? ' highlight' : '') +"]
["\t\t\t\t'\" d=\"M ' + (lineX[0] + centerX) + ',' +"]
["\t\t\t\t(lineY[0] + centerY);"]
["\t\t\t"]
["\t\t\tif ( angle != arcAngle )"]
["\t\t\t{"]
["\t\t\t\tsvg +="]
["\t\t\t\t\t' L ' + (centerX + bendRadius * Math.cos(angle)) + ',' +"]
["\t\t\t\t\t(centerY + bendRadius * Math.sin(angle)) +"]
["\t\t\t\t\t' A ' + bendRadius + ',' + bendRadius + ' 0 ' +"]
["\t\t\t\t\t'0,' + (angle > arcAngle ? '0' : '1') + ' ' +"]
["\t\t\t\t\t(centerX + bendRadius * Math.cos(arcAngle)) + ',' +"]
["\t\t\t\t\t(centerY + bendRadius * Math.sin(arcAngle));"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tfor ( var i = 1; i < lineX.length; i++ )"]
["\t\t\t{"]
["\t\t\t\tsvg +="]
["\t\t\t\t\t' L ' + (centerX + lineX[i]) + ',' +"]
["\t\t\t\t\t(centerY + lineY[i]);"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tsvg += '\"/>';"]
["\t\t\t"]
["\t\t\tif ( highlight )"]
["\t\t\t{"]
["\t\t\t\tif ( this.searchResultChildren() )"]
["\t\t\t\t{"]
["\t\t\t\t\tlabelSVG = labelSVG + searchResultString(this.searchResultChildren());"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tdrawBubbleSVG"]
["\t\t\t\t("]
["\t\t\t\t\tboxLeft - keyBuffer - keyNameWidth - fontSize / 2,"]
["\t\t\t\t\ttextY - fontSize,"]
["\t\t\t\t\tkeyNameWidth + fontSize,"]
["\t\t\t\t\tfontSize * 2,"]
["\t\t\t\t\tfontSize,"]
["\t\t\t\t\t0"]
["\t\t\t\t);"]
["\t\t\t\t"]
["\t\t\t\tif ( this.isSearchResult )"]
["\t\t\t\t{"]
["\t\t\t\t\tdrawSearchHighlights"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tlabel,"]
["\t\t\t\t\t\tboxLeft - keyBuffer - keyNameWidth,"]
["\t\t\t\t\t\ttextY,"]
["\t\t\t\t\t\t0"]
["\t\t\t\t\t)"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tsvg += svgText(labelSVG, boxLeft - keyBuffer, textY, 'end', bold, colorText);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tcontext.fillStyle = color;"]
["\t\t\tcontext.translate(-centerX, -centerY);"]
["\t\t\tcontext.strokeStyle = 'black';"]
["\t\t\t\tcontext.globalAlpha = 1;//this.alphaWedge.current();"]
["\t\t\t"]
["\t\t\tcontext.fillRect(boxLeft, offset, keySize, keySize);"]
["\t\t\t"]
["\t\t\tif ( patternAlpha )"]
["\t\t\t{"]
["\t\t\t\tcontext.globalAlpha = patternAlpha;"]
["\t\t\t\tcontext.fillStyle = hiddenPattern;"]
["\t\t\t\t"]
["\t\t\t\t// make clipping box for Firefox performance"]
["\t\t\t\tcontext.beginPath();"]
["\t\t\t\tcontext.moveTo(boxLeft, offset);"]
["\t\t\t\tcontext.lineTo(boxLeft + keySize, offset);"]
["\t\t\t\tcontext.lineTo(boxLeft + keySize, offset + keySize);"]
["\t\t\t\tcontext.lineTo(boxLeft, offset + keySize);"]
["\t\t\t\tcontext.closePath();"]
["\t\t\t\tcontext.save();"]
["\t\t\t\tcontext.clip();"]
["\t\t\t\t"]
["\t\t\t\tcontext.fillRect(boxLeft, offset, keySize, keySize);"]
["\t\t\t\tcontext.fillRect(boxLeft, offset, keySize, keySize);"]
["\t\t\t\t"]
["\t\t\t\tcontext.restore(); // remove clipping region"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( highlight )"]
["\t\t\t{"]
["\t\t\t\tthis.setHighlightStyle();"]
["\t\t\t\tcontext.fillRect(boxLeft, offset, keySize, keySize);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tcontext.lineWidth = thinLineWidth;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tcontext.strokeRect(boxLeft, offset, keySize, keySize);"]
["\t\t\t"]
["\t\t\tif ( lineX.length )"]
["\t\t\t{"]
["\t\t\t\tcontext.beginPath();"]
["\t\t\t\tcontext.moveTo(lineX[0] + centerX, lineY[0] + centerY);"]
["\t\t\t\t"]
["\t\t\t\tcontext.arc(centerX, centerY, bendRadius, angle, arcAngle, angle > arcAngle);"]
["\t\t\t\t"]
["\t\t\t\tfor ( var i = 1; i < lineX.length; i++ )"]
["\t\t\t\t{"]
["\t\t\t\t\tcontext.lineTo(lineX[i] + centerX, lineY[i] + centerY);"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tcontext.globalAlpha = this == selectedNode ?"]
["\t\t\t\t\tthis.children[0].alphaWedge.current() :"]
["\t\t\t\t\tthis.alphaWedge.current();"]
["\t\t\t\tcontext.lineWidth = highlight ? highlightLineWidth : thinLineWidth;"]
["\t\t\t\tcontext.stroke();"]
["\t\t\t\tcontext.globalAlpha = 1;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( highlight )"]
["\t\t\t{"]
["\t\t\t\tdrawBubbleCanvas"]
["\t\t\t\t("]
["\t\t\t\t\tboxLeft - keyBuffer - keyNameWidth - fontSize / 2,"]
["\t\t\t\t\ttextY - fontSize,"]
["\t\t\t\t\tkeyNameWidth + fontSize,"]
["\t\t\t\t\tfontSize * 2,"]
["\t\t\t\t\tfontSize,"]
["\t\t\t\t\t0"]
["\t\t\t\t);"]
["\t\t\t\t"]
["\t\t\t\tif ( this.isSearchResult )"]
["\t\t\t\t{"]
["\t\t\t\t\tdrawSearchHighlights"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tlabel,"]
["\t\t\t\t\t\tboxLeft - keyBuffer - keyNameWidth,"]
["\t\t\t\t\t\ttextY,"]
["\t\t\t\t\t\t0"]
["\t\t\t\t\t)"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tdrawText(label, boxLeft - keyBuffer, offset + keySize / 2, 0, 'end', bold, colorText);"]
["\t\t\t"]
["\t\t\tcontext.translate(centerX, centerY);"]
["\t\t}"]
["\t\t"]
["\t\tcurrentKey++;"]
["\t}"]
["\t"]
["\tthis.drawLabel = function(angle, bubble, bold, selected, radial)"]
["\t{"]
["\t\tif ( context.globalAlpha == 0 )"]
["\t\t{"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tvar innerText;"]
["\t\tvar label;"]
["\t\tvar radius;"]
["\t\t"]
["\t\tif ( radial )"]
["\t\t{"]
["\t\t\tradius = (this.radiusInner.current() + 1) * gRadius / 2;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tradius = this.labelRadius.current() * gRadius;"]
["\t\t}"]
["\t\t"]
["\t\tif ( radial && (selected || bubble ) )"]
["\t\t{"]
["\t\t\tvar percentage = this.getPercentage();"]
["\t\t\tinnerText = percentage + '%';"]
["\t\t}"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\t! radial &&"]
["\t\t\tthis != selectedNode &&"]
["\t\t\t! bubble &&"]
["\t\t\t( !zoomOut || this != selectedNodeLast)"]
["\t\t)"]
["\t\t{"]
["\t\t\tlabel = this.shortenLabel();"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tlabel = this.name;"]
["\t\t}"]
["\t\t"]
["\t\tvar flipped = drawTextPolar"]
["\t\t("]
["\t\t\tlabel,"]
["\t\t\tinnerText,"]
["\t\t\tangle,"]
["\t\t\tradius,"]
["\t\t\tradial,"]
["\t\t\tbubble,"]
["\t\t\tbold,"]
["//\t\t\tthis.isSearchResult && this.shouldAddSearchResultsString() && (!selected || this == selectedNode || highlight),"]
["\t\t\tthis.isSearchResult && (!selected || this == selectedNode || bubble),"]
["\t\t\t(this.hideAlone || !selected || this == selectedNode ) ? this.searchResultChildren() : 0"]
["\t\t);"]
["\t\t"]
["\t\tvar depth = this.getDepth() - selectedNode.getDepth() + 1;"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\t! radial &&"]
["\t\t\t! bubble &&"]
["\t\t\tthis != selectedNode &&"]
["\t\t\tthis.angleEnd.end != this.angleStart.end &&"]
["\t\t\tnLabelOffsets[depth - 2] > 2 &&"]
["\t\t\tthis.labelWidth.current() > (this.angleEnd.end - this.angleStart.end) * Math.abs(radius) &&"]
["\t\t\t! ( zoomOut && this == selectedNodeLast ) &&"]
["\t\t\tthis.labelRadius.end > 0"]
["\t\t)"]
["\t\t{"]
["\t\t\t// name extends beyond wedge; draw tick mark towards the central"]
["\t\t\t// radius for easier identification"]
["\t\t\t"]
["\t\t\tvar radiusCenter = compress ?"]
["\t\t\t\t(compressedRadii[depth - 1] + compressedRadii[depth - 2]) / 2 :"]
["\t\t\t\t(depth - .5) * nodeRadius;"]
["\t\t\t"]
["\t\t\tif ( this.labelRadius.end > radiusCenter )"]
["\t\t\t{"]
["\t\t\t\tif ( flipped )"]
["\t\t\t\t{"]
["\t\t\t\t\tdrawTick(radius - tickLength * 1.4 , tickLength, angle);"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tdrawTick(radius - tickLength * 1.7, tickLength, angle);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tif ( flipped )"]
["\t\t\t\t{"]
["\t\t\t\t\tdrawTick(radius + tickLength * .7, tickLength, angle);"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tdrawTick(radius + tickLength * .4, tickLength, angle);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.drawLines = function(angleStart, angleEnd, radiusInner, drawRadial, selected)"]
["\t{"]
["\t\tif ( snapshotMode )"]
["\t\t{"]
["\t\t\tif ( this != selectedNode)"]
["\t\t\t{"]
["\t\t\t\tif ( angleEnd == angleStart + Math.PI * 2 )"]
["\t\t\t\t{"]
["\t\t\t\t\t// fudge to prevent overlap, which causes arc ambiguity"]
["\t\t\t\t\t//"]
["\t\t\t\t\tangleEnd -= .1 / gRadius;"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tvar longArc = angleEnd - angleStart > Math.PI ? 1 : 0;"]
["\t\t\t\t"]
["\t\t\t\tvar x1 = centerX + radiusInner * Math.cos(angleStart);"]
["\t\t\t\tvar y1 = centerY + radiusInner * Math.sin(angleStart);"]
["\t\t\t\t"]
["\t\t\t\tvar x2 = centerX + gRadius * Math.cos(angleStart);"]
["\t\t\t\tvar y2 = centerY + gRadius * Math.sin(angleStart);"]
["\t\t\t\t"]
["\t\t\t\tvar x3 = centerX + gRadius * Math.cos(angleEnd);"]
["\t\t\t\tvar y3 = centerY + gRadius * Math.sin(angleEnd);"]
["\t\t\t\t"]
["\t\t\t\tvar x4 = centerX + radiusInner * Math.cos(angleEnd);"]
["\t\t\t\tvar y4 = centerY + radiusInner * Math.sin(angleEnd);"]
["\t\t\t\t"]
["\t\t\t\tif ( this.alphaArc.end )"]
["\t\t\t\t{"]
["\t\t\t\t\tvar dArray ="]
["\t\t\t\t\t["]
["\t\t\t\t\t\t\" M \", x4, \",\", y4,"]
["\t\t\t\t\t\t\" A \", radiusInner, \",\", radiusInner, \" 0 \", longArc,"]
["\t\t\t\t\t\t\t\" 0 \", x1, \",\", y1"]
["\t\t\t\t\t];"]
["\t\t\t\t\t"]
["\t\t\t\t\tsvg += '<path class=\"line\" d=\"' + dArray.join('') + '\"/>';"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif ( drawRadial && this.alphaLine.end )"]
["\t\t\t\t{"]
["\t\t\t\t\tsvg += '<line x1=\"' + x3 + '\" y1=\"' + y3 + '\" x2=\"' + x4 + '\" y2=\"' + y4 + '\"/>';"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tcontext.lineWidth = thinLineWidth;"]
["\t\t\tcontext.strokeStyle = 'black';"]
["\t\t\tcontext.beginPath();"]
["\t\t\tcontext.arc(0, 0, radiusInner, angleStart, angleEnd, false);"]
["\t\t\tcontext.globalAlpha = this.alphaArc.current();"]
["\t\t\tcontext.stroke();"]
["\t\t\t"]
["\t\t\tif ( drawRadial )"]
["\t\t\t{"]
["\t\t\t\tvar x1 = radiusInner * Math.cos(angleEnd);"]
["\t\t\t\tvar y1 = radiusInner * Math.sin(angleEnd);"]
["\t\t\t\tvar x2 = gRadius * Math.cos(angleEnd);"]
["\t\t\t\tvar y2 = gRadius * Math.sin(angleEnd);"]
["\t\t\t\t"]
["\t\t\t\tcontext.beginPath();"]
["\t\t\t\tcontext.moveTo(x1, y1);"]
["\t\t\t\tcontext.lineTo(x2, y2);"]
["\t\t\t\t"]
["//\t\t\t\tif ( this.getCollapse() )//( selected && this != selectedNode )"]
["\t\t\t\t{"]
["\t\t\t\t\tcontext.globalAlpha = this.alphaLine.current();"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tcontext.stroke();"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.drawMap = function(child)"]
["\t{"]
["\t\tif ( this.parent )"]
["\t\t{"]
["\t\t\tthis.parent.drawMap(child);"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.getCollapse() && this != child || this == focusNode )"]
["\t\t{"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tvar angleStart ="]
["\t\t\t(child.baseMagnitude - this.baseMagnitude) / this.magnitude * Math.PI * 2 +"]
["\t\t\trotationOffset;"]
["\t\tvar angleEnd ="]
["\t\t\t(child.baseMagnitude - this.baseMagnitude + child.magnitude) /"]
["\t\t\tthis.magnitude * Math.PI * 2 +"]
["\t\t\trotationOffset;"]
["\t\t"]
["\t\tvar box = this.getMapPosition();"]
["\t\t"]
["\t\tcontext.save();"]
["\t\tcontext.fillStyle = 'black';"]
["\t\tcontext.textAlign = 'end';"]
["\t\tcontext.textBaseline = 'middle';"]
["\t\t"]
["\t\tvar textX = box.x - mapRadius - mapBuffer;"]
["\t\tvar percentage = getPercentage(child.magnitude / this.magnitude);"]
["\t\t"]
["\t\tvar highlight = this == selectedNode || this == highlightedNode;"]
["\t\t"]
["\t\tif ( highlight )"]
["\t\t{"]
["\t\t\tcontext.font = fontBold;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tcontext.font = fontNormal;"]
["\t\t}"]
["\t\t"]
["\t\tcontext.fillText(percentage + '% of', textX, box.y - mapRadius / 3);"]
["\t\tcontext.fillText(this.name, textX, box.y + mapRadius / 3);"]
["\t\t"]
["\t\tif ( highlight )"]
["\t\t{"]
["\t\t\tcontext.font = fontNormal;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this == highlightedNode && this != selectedNode )"]
["\t\t{"]
["\t\t\tcontext.fillStyle = 'rgb(245, 245, 245)';"]
["//\t\t\tcontext.fillStyle = 'rgb(200, 200, 200)';"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tcontext.fillStyle = 'rgb(255, 255, 255)';"]
["\t\t}"]
["\t\t"]
["\t\tcontext.beginPath();"]
["\t\tcontext.arc(box.x, box.y, mapRadius, 0, Math.PI * 2, true);"]
["\t\tcontext.closePath();"]
["\t\tcontext.fill();"]
["\t\t"]
["\t\tif ( this == selectedNode )"]
["\t\t{"]
["\t\t\tcontext.lineWidth = 1;"]
["\t\t\tcontext.fillStyle = 'rgb(100, 100, 100)';"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tif ( this == highlightedNode )"]
["\t\t\t{"]
["\t\t\t\tcontext.lineWidth = .2;"]
["\t\t\t\tcontext.fillStyle = 'rgb(190, 190, 190)';"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tcontext.lineWidth = .2;"]
["\t\t\t\tcontext.fillStyle = 'rgb(200, 200, 200)';"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tvar maxDepth = this.getMaxDepth();"]
["\t\t"]
["\t\tif ( ! compress && maxDepth > maxPossibleDepth + this.getDepth() - 1 )"]
["\t\t{"]
["\t\t\tmaxDepth = maxPossibleDepth + this.getDepth() - 1;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.getDepth() < selectedNode.getDepth() )"]
["\t\t{"]
["\t\t\tif ( child.getDepth() - 1 >= maxDepth )"]
["\t\t\t{"]
["\t\t\t\tmaxDepth = child.getDepth();"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tvar radiusInner;"]
["\t\t"]
["\t\tif ( compress )"]
["\t\t{"]
["\t\t\tradiusInner = 0;"]
["//\t\t\t\tMath.atan(child.getDepth() - this.getDepth()) /"]
["//\t\t\t\tMath.PI * 2 * .9;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tradiusInner ="]
["\t\t\t\t(child.getDepth() - this.getDepth()) /"]
["\t\t\t\t(maxDepth - this.getDepth() + 1);"]
["\t\t}"]
["\t\t"]
["\t\tcontext.stroke();"]
["\t\tcontext.beginPath();"]
["\t\t"]
["\t\tif ( radiusInner == 0 )"]
["\t\t{"]
["\t\t\tcontext.moveTo(box.x, box.y);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tcontext.arc(box.x, box.y, mapRadius * radiusInner, angleEnd, angleStart, true);"]
["\t\t}"]
["\t\t"]
["\t\tcontext.arc(box.x, box.y, mapRadius, angleStart, angleEnd, false);"]
["\t\tcontext.closePath();"]
["\t\tcontext.fill();"]
["\t\t"]
["\t\tif ( this == highlightedNode && this != selectedNode )"]
["\t\t{"]
["\t\t\tcontext.lineWidth = 1;"]
["\t\t\tcontext.stroke();"]
["\t\t}"]
["\t\t"]
["\t\tcontext.restore();"]
["\t}"]
["\t"]
["\tthis.drawReferenceRings = function(childRadiusInner)"]
["\t{"]
["\t\tif ( snapshotMode )"]
["\t\t{"]
["\t\t\tsvg +="]
["\t\t\t\t'<circle cx=\"' + centerX + '\" cy=\"' + centerY +"]
["\t\t\t\t'\" r=\"' + childRadiusInner + '\"/>';"]
["\t\t\tsvg +="]
["\t\t\t\t'<circle cx=\"' + centerX + '\" cy=\"' + centerY +"]
["\t\t\t\t'\" r=\"' + gRadius + '\"/>';"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tcontext.globalAlpha = 1 - this.alphaLine.current();//this.getUncollapsed().alphaLine.current();"]
["\t\t\tcontext.beginPath();"]
["\t\t\tcontext.arc(0, 0, childRadiusInner, 0, Math.PI * 2, false);"]
["\t\t\tcontext.stroke();"]
["\t\t\tcontext.beginPath();"]
["\t\t\tcontext.arc(0, 0, gRadius, 0, Math.PI * 2, false);"]
["\t\t\tcontext.stroke();"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.getCollapse = function()"]
["\t{"]
["\t\treturn ("]
["\t\t\tcollapse &&"]
["\t\t\tthis.collapse &&"]
["\t\t\tthis.depth != maxAbsoluteDepth"]
["\t\t\t);"]
["\t}"]
["\t"]
["\tthis.getDepth = function()"]
["\t{"]
["\t\tif ( collapse )"]
["\t\t{"]
["\t\t\treturn this.depthCollapsed;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn this.depth;"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.getMagnitude = function()"]
["\t{"]
["\t\treturn this.attributes[magnitudeIndex][currentDataset];"]
["\t}"]
["\t"]
["\tthis.getMapPosition = function()"]
["\t{"]
["\t\treturn {"]
["\t\t\tx : (details.offsetLeft + details.clientWidth - mapRadius),"]
["\t\t\ty : ((focusNode.getDepth() - this.getDepth()) *"]
["\t\t\t\t(mapBuffer + mapRadius * 2) - mapRadius) +"]
["\t\t\t\tdetails.clientHeight + details.offsetTop"]
["\t\t};"]
["\t}"]
["\t"]
["\tthis.getMaxDepth = function(limit)"]
["\t{"]
["\t\tvar max;"]
["\t\t"]
["\t\tif ( collapse )"]
["\t\t{"]
["\t\t\treturn this.maxDepthCollapsed;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tif ( this.maxDepth > maxAbsoluteDepth )"]
["\t\t\t{"]
["\t\t\t\treturn maxAbsoluteDepth;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\treturn this.maxDepth;"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.getData = function(index, summary)"]
["\t{"]
["\t\tvar files = new Array();"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\tthis.attributes[index] != null &&"]
["\t\t\tthis.attributes[index][currentDataset] != null &&"]
["\t\t\tthis.attributes[index][currentDataset] != ''"]
["\t\t)"]
["\t\t{"]
["\t\t\tfiles.push"]
["\t\t\t("]
["\t\t\t\tdocument.location +"]
["\t\t\t\t'.files/' +"]
["\t\t\t\tthis.attributes[index][currentDataset]"]
["\t\t\t);"]
["\t\t}"]
["\t\t"]
["\t\tif ( summary )"]
["\t\t{"]
["\t\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t\t{"]
["\t\t\t\tfiles = files.concat(this.children[i].getData(index, true));"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\treturn files;"]
["\t}"]
["\t"]
["\tthis.getList = function(index, summary)"]
["\t{"]
["\t\tvar list;"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\tthis.attributes[index] != null &&"]
["\t\t\tthis.attributes[index][currentDataset] != null"]
["\t\t)"]
["\t\t{"]
["\t\t\tlist = this.attributes[index][currentDataset];"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tlist = new Array();"]
["\t\t}"]
["\t\t"]
["\t\tif ( summary )"]
["\t\t{"]
["\t\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t\t{"]
["\t\t\t\tlist = list.concat(this.children[i].getList(index, true));"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\treturn list;"]
["\t}"]
["\t"]
["\tthis.getParent = function()"]
["\t{"]
["\t\t// returns parent, accounting for collapsing or 0 if doesn't exist"]
["\t\t"]
["\t\tvar parent = this.parent;"]
["\t\t"]
["\t\twhile ( parent != 0 && parent.getCollapse() )"]
["\t\t{"]
["\t\t\tparent = parent.parent;"]
["\t\t}"]
["\t\t"]
["\t\treturn parent;"]
["\t}"]
["\t"]
["\tthis.getPercentage = function()"]
["\t{"]
["\t\treturn getPercentage(this.magnitude / selectedNode.magnitude);"]
["\t}"]
["\t"]
["\tthis.getUnclassifiedPercentage = function()"]
["\t{"]
["\t\tif ( this.children.length )"]
["\t\t{"]
["\t\t\tvar lastChild = this.children[this.children.length - 1];"]
["\t\t"]
["\t\t\treturn getPercentage"]
["\t\t\t("]
["\t\t\t\t("]
["\t\t\t\t\tthis.baseMagnitude +"]
["\t\t\t\t\tthis.magnitude -"]
["\t\t\t\t\tlastChild.magnitude -"]
["\t\t\t\t\tlastChild.baseMagnitude"]
["\t\t\t\t) / this.magnitude"]
["\t\t\t) + '%';"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn '100%';"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.getUnclassifiedText = function()"]
["\t{"]
["\t\treturn '[other '+ this.name + ']';"]
["\t}"]
["\t"]
["\tthis.getUncollapsed = function()"]
["\t{"]
["\t\t// recurse through collapsed children until uncollapsed node is found"]
["\t\t"]
["\t\tif ( this.getCollapse() )"]
["\t\t{"]
["\t\t\treturn this.children[0].getUncollapsed();"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn this;"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.hasChildren = function()"]
["\t{"]
["\t\treturn this.children.length && this.depth < maxAbsoluteDepth && this.magnitude;"]
["\t}"]
["\t"]
["\tthis.hasParent = function(parent)"]
["\t{"]
["\t\tif ( this.parent )"]
["\t\t{"]
["\t\t\tif ( this.parent == parent )"]
["\t\t\t{"]
["\t\t\t\treturn true;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\treturn this.parent.hasParent(parent);"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn false;"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.maxVisibleDepth = function(maxDepth)"]
["\t{"]
["\t\tvar childInnerRadius;"]
["\t\tvar depth = this.getDepth() - selectedNode.getDepth() + 1;"]
["\t\tvar currentMaxDepth = depth;"]
["\t\t"]
["\t\tif ( this.hasChildren() && depth < maxDepth)"]
["\t\t{"]
["\t\t\tvar lastChild = this.children[this.children.length - 1];"]
["\t\t\t"]
["\t\t\tif ( this.name == 'Pseudomonadaceae' )"]
["\t\t\t{"]
["\t\t\t\tvar x = 3;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\tlastChild.baseMagnitude + lastChild.magnitude <"]
["\t\t\t\tthis.baseMagnitude + this.magnitude"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tcurrentMaxDepth++;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( compress )"]
["\t\t\t{"]
["\t\t\t\tchildInnerRadius = compressedRadii[depth - 1];"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tchildInnerRadius = (depth) / maxDepth;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t\t{"]
["\t\t\t\tif"]
["\t\t\t\t(//true ||"]
["\t\t\t\t\tthis.children[i].magnitude *"]
["\t\t\t\t\tangleFactor *"]
["\t\t\t\t\t(childInnerRadius + 1) *"]
["\t\t\t\t\tgRadius >="]
["\t\t\t\t\tminWidth()"]
["\t\t\t\t)"]
["\t\t\t\t{"]
["\t\t\t\t\tvar childMaxDepth = this.children[i].maxVisibleDepth(maxDepth);"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( childMaxDepth > currentMaxDepth )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tcurrentMaxDepth = childMaxDepth;"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\treturn currentMaxDepth;"]
["\t}"]
["\t"]
["\tthis.resetLabelWidth = function()"]
["\t{"]
["\t\tvar nameWidthOld = this.nameWidth;"]
["\t\t"]
["\t\tif ( true || ! this.radial )//&& fontSize != fontSizeLast )"]
["\t\t{"]
["\t\t\tvar dim = context.measureText(this.name);"]
["\t\t\tthis.nameWidth = dim.width;"]
["\t\t}"]
["\t\t"]
["\t\tif ( fontSize != fontSizeLast && this.labelWidth.end == nameWidthOld * labelWidthFudge )"]
["\t\t{"]
["\t\t\t// font size changed; adjust start of tween to match"]
["\t\t\t"]
["\t\t\tthis.labelWidth.start = this.nameWidth * labelWidthFudge;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tthis.labelWidth.start = this.labelWidth.current();"]
["\t\t}"]
["\t\t"]
["\t\tthis.labelWidth.end = this.nameWidth * labelWidthFudge;"]
["\t}"]
["\t"]
["\tthis.restrictLabelWidth = function(width)"]
["\t{"]
["\t\tif ( width < this.labelWidth.end )"]
["\t\t{"]
["\t\t\tthis.labelWidth.end = width;"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.search = function()"]
["\t{"]
["\t\tthis.isSearchResult = false;"]
["\t\tthis.searchResults = 0;"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\t! this.getCollapse() &&"]
["\t\t\tsearch.value != '' &&"]
["\t\t\tthis.name.toLowerCase().indexOf(search.value.toLowerCase()) != -1"]
["\t\t)"]
["\t\t{"]
["\t\t\tthis.isSearchResult = true;"]
["\t\t\tthis.searchResults = 1;"]
["\t\t\tnSearchResults++;"]
["\t\t}"]
["\t\t"]
["\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t{"]
["\t\t\tthis.searchResults += this.children[i].search();"]
["\t\t}"]
["\t\t"]
["\t\treturn this.searchResults;"]
["\t}"]
["\t"]
["\tthis.searchResultChildren = function()"]
["\t{"]
["\t\tif ( this.isSearchResult )"]
["\t\t{"]
["\t\t\treturn this.searchResults - 1;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn this.searchResults;"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.setDepth = function(depth, depthCollapsed)"]
["\t{"]
["\t\tthis.depth = depth;"]
["\t\tthis.depthCollapsed = depthCollapsed;"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\tthis.children.length == 1 &&"]
["//\t\t\tthis.magnitude > 0 &&"]
["\t\t\tthis.children[0].magnitude == this.magnitude &&"]
["\t\t\t( head.children.length > 1 || this.children[0].children.length )"]
["\t\t)"]
["\t\t{"]
["\t\t\tthis.collapse = true;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tthis.collapse = false;"]
["\t\t\tdepthCollapsed++;"]
["\t\t}"]
["\t\t"]
["\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t{"]
["\t\t\tthis.children[i].setDepth(depth + 1, depthCollapsed);"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.setHighlightStyle = function()"]
["\t{"]
["\t\tcontext.lineWidth = highlightLineWidth;"]
["\t\t"]
["\t\tif ( this.hasChildren() || this != focusNode || this != highlightedNode )"]
["\t\t{"]
["\t\t\tcontext.strokeStyle = 'black';"]
["\t\t\tcontext.fillStyle = \"rgba(255, 255, 255, .3)\";"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tcontext.strokeStyle = 'rgb(90,90,90)';"]
["\t\t\tcontext.fillStyle = \"rgba(155, 155, 155, .3)\";"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.setLabelWidth = function(node)"]
["\t{"]
["\t\tif ( ! shorten || this.radial )"]
["\t\t{"]
["\t\t\treturn; // don't need to set width"]
["\t\t}"]
["\t\t"]
["\t\tif ( node.hide )"]
["\t\t{"]
["\t\t\talert('wtf');"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tvar angle = (this.angleStart.end + this.angleEnd.end) / 2;"]
["\t\tvar a; // angle difference"]
["\t\t"]
["\t\tif ( node == selectedNode )"]
["\t\t{"]
["\t\t\ta = Math.abs(angle - node.angleOther);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\ta = Math.abs(angle - (node.angleStart.end + node.angleEnd.end) / 2);"]
["\t\t}"]
["\t\t"]
["\t\tif ( a == 0 )"]
["\t\t{"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tif ( a > Math.PI )"]
["\t\t{"]
["\t\t\ta = 2 * Math.PI - a;"]
["\t\t}"]
["\t\t"]
["\t\tif ( node.radial || node == selectedNode )"]
["\t\t{"]
["\t\t\tvar nodeLabelRadius;"]
["\t\t\t"]
["\t\t\tif ( node == selectedNode )"]
["\t\t\t{"]
["\t\t\t\t// radial 'other' label"]
["\t\t\t\t"]
["\t\t\t\tnodeLabelRadius = (node.children[0].radiusInner.end + 1) / 2;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tnodeLabelRadius = (node.radiusInner.end + 1) / 2;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( a < Math.PI / 2 )"]
["\t\t\t{"]
["\t\t\t\tvar r = this.labelRadius.end * gRadius + .5 * fontSize"]
["\t\t\t\tvar hypotenuse = r / Math.cos(a);"]
["\t\t\t\tvar opposite = r * Math.tan(a);"]
["\t\t\t\tvar fontRadius = .8 * fontSize;"]
["\t\t\t\t"]
["\t\t\t\tif"]
["\t\t\t\t("]
["\t\t\t\t\tnodeLabelRadius * gRadius < hypotenuse &&"]
["\t\t\t\t\tthis.labelWidth.end / 2 + fontRadius > opposite"]
["\t\t\t\t)"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.labelWidth.end = 2 * (opposite - fontRadius);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\telse if"]
["\t\t("]
["\t\t\tthis.labelRadius.end == node.labelRadius.end &&"]
["\t\t\ta < Math.PI / 4"]
["\t\t)"]
["\t\t{"]
["\t\t\t// same radius with small angle; use circumferential approximation"]
["\t\t\t"]
["\t\t\tvar dist = a * this.labelRadius.end * gRadius - fontSize * (1 - a * 4 / Math.PI) * 1.3;"]
["\t\t\t"]
["\t\t\tif ( this.labelWidth.end < dist )"]
["\t\t\t{"]
["\t\t\t\tnode.restrictLabelWidth((dist - this.labelWidth.end / 2) * 2);"]
["\t\t\t}"]
["\t\t\telse if ( node.labelWidth.end < dist )"]
["\t\t\t{"]
["\t\t\t\tthis.restrictLabelWidth((dist - node.labelWidth.end / 2) * 2);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\t// both labels reach halfway point; restrict both"]
["\t\t\t\t"]
["\t\t\t\tthis.labelWidth.end = dist;"]
["\t\t\t\tnode.labelWidth.end = dist"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tvar r1 = this.labelRadius.end * gRadius;"]
["\t\t\tvar r2 = node.labelRadius.end * gRadius;"]
["\t\t\t"]
["\t\t\t// first adjust the radii to account for the height of the font by shifting them"]
["\t\t\t// toward each other"]
["\t\t\t//"]
["\t\t\tvar fontFudge = .35 * fontSize;"]
["\t\t\t//"]
["\t\t\tif ( this.labelRadius.end < node.labelRadius.end )"]
["\t\t\t{"]
["\t\t\t\tr1 += fontFudge;"]
["\t\t\t\tr2 -= fontFudge;"]
["\t\t\t}"]
["\t\t\telse if ( this.labelRadius.end > node.labelRadius.end )"]
["\t\t\t{"]
["\t\t\t\tr1 -= fontFudge;"]
["\t\t\t\tr2 += fontFudge;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tr1 -= fontFudge;"]
["\t\t\t\tr2 -= fontFudge;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tvar r1s = r1 * r1;"]
["\t\t\tvar r2s = r2 * r2;"]
["\t\t\t"]
["\t\t\t// distance between the centers of the two labels"]
["\t\t\t//"]
["\t\t\tvar dist = Math.sqrt(r1s + r2s - 2 * r1 * r2 * Math.cos(a));"]
["\t\t\t"]
["\t\t\t// angle at our label center between our radius and the line to the other label center"]
["\t\t\t//"]
["\t\t\tvar b = Math.acos((r1s + dist * dist - r2s) / (2 * r1 * dist));"]
["\t\t\t"]
["\t\t\t// distance from our label center to the intersection of the two tangents"]
["\t\t\t//"]
["\t\t\tvar l1 = Math.sin(a + b - Math.PI / 2) * dist / Math.sin(Math.PI - a);"]
["\t\t\t"]
["\t\t\t// distance from other label center the the intersection of the two tangents"]
["\t\t\t//"]
["\t\t\tvar l2 = Math.sin(Math.PI / 2 - b) * dist / Math.sin(Math.PI - a);"]
["\t\t\t"]
["\t\t\tl1 = Math.abs(l1) - .4 * fontSize;"]
["\t\t\tl2 = Math.abs(l2) - .4 * fontSize;"]
["/*\t\t\t"]
["\t\t\t// amount to shorten the distances because of the height of the font"]
["\t\t\t//"]
["\t\t\tvar l3 = 0;"]
["\t\t\tvar fontRadius = fontSize * .55;"]
["\t\t\t//"]
["\t\t\tif ( l1 < 0 || l2 < 0 )"]
["\t\t\t{"]
["\t\t\t\tvar l4 = fontRadius / Math.tan(a);"]
["\t\t\tl1 = Math.abs(l1);"]
["\t\t\tl2 = Math.abs(l2);"]
["\t\t\t"]
["\t\t\t\tl1 -= l4;"]
["\t\t\t\tl2 -= l4;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tvar c = Math.PI - a;"]
["\t\t\t\t"]
["\t\t\t\tl3 = fontRadius * Math.tan(c / 2);"]
["\t\t\t}"]
["*/\t\t\t"]
["\t\t\tif ( this.labelWidth.end / 2 > l1 && node.labelWidth.end / 2 > l2 )"]
["\t\t\t{"]
["\t\t\t\t// shorten the farthest one from the intersection"]
["\t\t\t\t"]
["\t\t\t\tif ( l1 > l2 )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.restrictLabelWidth(2 * (l1));// - l3 - fontRadius));"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tnode.restrictLabelWidth(2 * (l2));// - l3 - fontRadius));"]
["\t\t\t\t}"]
["\t\t\t}/*"]
["\t\t\telse if ( this.labelWidth.end / 2 > l1 + l3 && node.labelWidth.end / 2 > l2 - l3 )"]
["\t\t\t{"]
["\t\t\t\tnode.restrictLabelWidth(2 * (l2 - l3));"]
["\t\t\t}"]
["\t\t\telse if ( this.labelWidth.end / 2 > l1 - l3 && node.labelWidth.end / 2 > l2 + l3 )"]
["\t\t\t{"]
["\t\t\t\tthis.restrictLabelWidth(2 * (l1 - l3));"]
["\t\t\t}*/"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.setMagnitudes = function(baseMagnitude)"]
["\t{"]
["\t\tthis.magnitude = this.getMagnitude();"]
["\t\tthis.baseMagnitude = baseMagnitude;"]
["\t\t"]
["\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t{"]
["\t\t\tthis.children[i].setMagnitudes(baseMagnitude);"]
["\t\t\tbaseMagnitude += this.children[i].magnitude;"]
["\t\t}"]
["\t\t"]
["\t\tthis.maxChildMagnitude = baseMagnitude;"]
["\t}"]
["\t"]
["\tthis.setMaxDepths = function()"]
["\t{"]
["\t\tthis.maxDepth = this.depth;"]
["\t\tthis.maxDepthCollapsed = this.depthCollapsed;"]
["\t\t"]
["\t\tfor ( i in this.children )"]
["\t\t{"]
["\t\t\tvar child = this.children[i];"]
["\t\t\t"]
["\t\t\tchild.setMaxDepths();"]
["\t\t\t"]
["\t\t\tif ( child.maxDepth > this.maxDepth )"]
["\t\t\t{"]
["\t\t\t\tthis.maxDepth = child.maxDepth;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\tchild.maxDepthCollapsed > this.maxDepthCollapsed &&"]
["\t\t\t\t(child.depth <= maxAbsoluteDepth || maxAbsoluteDepth == 0)"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tthis.maxDepthCollapsed = child.maxDepthCollapsed;"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.setTargetLabelRadius = function()"]
["\t{"]
["\t\tvar depth = this.getDepth() - selectedNode.getDepth() + 1;"]
["\t\tvar index = depth - 2;"]
["\t\tvar labelOffset = labelOffsets[index];"]
["\t\t"]
["\t\tif ( this.radial )"]
["\t\t{"]
["\t\t\t//this.labelRadius.setTarget((this.radiusInner.end + 1) / 2);"]
["\t\t\tvar max ="]
["\t\t\t\tdepth == maxDisplayDepth ?"]
["\t\t\t\t1 :"]
["\t\t\t\tcompressedRadii[index + 1];"]
["\t\t\t"]
["\t\t\tthis.labelRadius.setTarget((compressedRadii[index] + max) / 2);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tvar radiusCenter;"]
["\t\t\tvar width;"]
["\t\t\t"]
["\t\t\tif ( compress )"]
["\t\t\t{"]
["\t\t\t\tif ( nLabelOffsets[index] > 1 )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.labelRadius.setTarget"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tlerp"]
["\t\t\t\t\t\t("]
["\t\t\t\t\t\t\tlabelOffset + .75,"]
["\t\t\t\t\t\t\t0,"]
["\t\t\t\t\t\t\tnLabelOffsets[index] + .5,"]
["\t\t\t\t\t\t\tcompressedRadii[index],"]
["\t\t\t\t\t\t\tcompressedRadii[index + 1]"]
["\t\t\t\t\t\t)"]
["\t\t\t\t\t);"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.labelRadius.setTarget((compressedRadii[index] + compressedRadii[index + 1]) / 2);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tradiusCenter ="]
["\t\t\t\t\tnodeRadius * (depth - 1) +"]
["\t\t\t\t\tnodeRadius / 2;"]
["\t\t\t\twidth = nodeRadius;"]
["\t\t\t\t"]
["\t\t\t\tthis.labelRadius.setTarget"]
["\t\t\t\t("]
["\t\t\t\t\tradiusCenter + width * ((labelOffset + 1) / (nLabelOffsets[index] + 1) - .5)"]
["\t\t\t\t);"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( ! this.hide && ! this.keyed && nLabelOffsets[index] )"]
["\t\t{"]
["\t\t\t// check last and first labels in each track for overlap"]
["\t\t\t"]
["\t\t\tfor ( var i = 0; i < maxDisplayDepth - 1; i++ )"]
["\t\t\t{"]
["\t\t\t\tfor ( var j = 0; j <= nLabelOffsets[i]; j++ )"]
["\t\t\t\t{"]
["\t\t\t\t\tvar last = labelLastNodes[i][j];"]
["\t\t\t\t\tvar first = labelFirstNodes[i][j];"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( last )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tif ( j == nLabelOffsets[i] )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\t// last is radial"]
["\t\t\t\t\t\t\tthis.setLabelWidth(last);"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\telse"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tlast.setLabelWidth(this);"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t}"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( first )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tif ( j == nLabelOffsets[i] )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tthis.setLabelWidth(first);"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\telse"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tfirst.setLabelWidth(this);"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( selectedNode.canDisplayLabelOther )"]
["\t\t\t{"]
["\t\t\t\tthis.setLabelWidth(selectedNode); // in case there is an 'other' label"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( this.radial )"]
["\t\t\t{"]
["\t\t\t\t// use the last 'track' of this depth for radial"]
["\t\t\t\t"]
["\t\t\t\tlabelLastNodes[index][nLabelOffsets[index]] = this;"]
["\t\t\t\t"]
["\t\t\t\tif ( labelFirstNodes[index][nLabelOffsets[index]] == 0 )"]
["\t\t\t\t{"]
["\t\t\t\t\tlabelFirstNodes[index][nLabelOffsets[index]] = this;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tlabelLastNodes[index][labelOffset] = this;"]
["\t\t\t\t"]
["\t\t\t\t// update offset"]
["\t\t\t\t"]
["\t\t\t\tlabelOffsets[index] += 1;"]
["\t\t\t\t"]
["\t\t\t\tif ( labelOffsets[index] > nLabelOffsets[index] )"]
["\t\t\t\t{"]
["\t\t\t\t\tlabelOffsets[index] -= nLabelOffsets[index];"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( !(nLabelOffsets[index] & 1) )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tlabelOffsets[index]--;"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t\telse if ( labelOffsets[index] == nLabelOffsets[index] )"]
["\t\t\t\t{"]
["\t\t\t\t\tlabelOffsets[index] -= nLabelOffsets[index];"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( false && !(nLabelOffsets[index] & 1) )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tlabelOffsets[index]++;"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif ( labelFirstNodes[index][labelOffset] == 0 )"]
["\t\t\t\t{"]
["\t\t\t\t\tlabelFirstNodes[index][labelOffset] = this;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\telse if ( this.hide )"]
["\t\t{"]
["\t\t\tthis.labelWidth.end = 0;"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.setTargets = function()"]
["\t{"]
["\t\tif ( this == selectedNode )"]
["\t\t{"]
["\t\t\tthis.setTargetsSelected"]
["\t\t\t("]
["\t\t\t\t0,"]
["\t\t\t\t1,"]
["\t\t\t\tlightnessBase,"]
["\t\t\t\tfalse,"]
["\t\t\t\tfalse"]
["\t\t\t);"]
["\t\t\treturn;"]
["\t\t}"]
["\t\t"]
["\t\tvar depthRelative = this.getDepth() - selectedNode.getDepth();"]
["\t\t"]
["\t\tvar parentOfSelected = selectedNode.hasParent(this);"]
["/*\t\t("]
["//\t\t\t! this.getCollapse() &&"]
["\t\t\tthis.baseMagnitude <= selectedNode.baseMagnitude &&"]
["\t\t\tthis.baseMagnitude + this.magnitude >="]
["\t\t\tselectedNode.baseMagnitude + selectedNode.magnitude"]
["\t\t);"]
["*/\t\t"]
["\t\tif ( parentOfSelected )"]
["\t\t{"]
["\t\t\tthis.resetLabelWidth();"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\t//context.font = fontNormal;"]
["\t\t\tvar dim = context.measureText(this.name);"]
["\t\t\tthis.nameWidth = dim.width;"]
["\t\t\t//this.labelWidth.setTarget(this.labelWidth.end);"]
["\t\t\tthis.labelWidth.setTarget(0);"]
["\t\t}"]
["\t\t"]
["\t\t// set angles"]
["\t\t//"]
["\t\tif ( this.baseMagnitude <= selectedNode.baseMagnitude )"]
["\t\t{"]
["\t\t\tthis.angleStart.setTarget(0);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tthis.angleStart.setTarget(Math.PI * 2);"]
["\t\t}"]
["\t\t//"]
["\t\tif"]
["\t\t("]
["\t\t\tparentOfSelected ||"]
["\t\t\tthis.baseMagnitude + this.magnitude >="]
["\t\t\tselectedNode.baseMagnitude + selectedNode.magnitude"]
["\t\t)"]
["\t\t{"]
["\t\t\tthis.angleEnd.setTarget(Math.PI * 2);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tthis.angleEnd.setTarget(0);"]
["\t\t}"]
["\t\t"]
["\t\t// children"]
["\t\t//"]
["\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t{"]
["\t\t\tthis.children[i].setTargets();"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.getDepth() <= selectedNode.getDepth() )"]
["\t\t{"]
["\t\t\t// collapse in"]
["\t\t\t"]
["\t\t\tthis.radiusInner.setTarget(0);"]
["\t\t\t"]
["\t\t\tif ( parentOfSelected )"]
["\t\t\t{"]
["\t\t\t\tthis.labelRadius.setTarget"]
["\t\t\t\t("]
["\t\t\t\t\t(depthRelative) *"]
["\t\t\t\t\thistorySpacingFactor * fontSize / gRadius"]
["\t\t\t\t);"]
["\t\t\t\t//this.scale.setTarget(1 - (selectedNode.getDepth() - this.getDepth()) / 18); // TEMP"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tthis.labelRadius.setTarget(0);"]
["\t\t\t\t//this.scale.setTarget(1); // TEMP"]
["\t\t\t}"]
["\t\t}"]
["\t\telse if ( depthRelative + 1 > maxDisplayDepth )"]
["\t\t{"]
["\t\t\t// collapse out"]
["\t\t\t"]
["\t\t\tthis.radiusInner.setTarget(1);"]
["\t\t\tthis.labelRadius.setTarget(1);"]
["\t\t\t//this.scale.setTarget(1); // TEMP"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\t// don't collapse"]
["\t\t\t"]
["\t\t\tif ( compress )"]
["\t\t\t{"]
["\t\t\t\tthis.radiusInner.setTarget(compressedRadii[depthRelative - 1]);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tthis.radiusInner.setTarget(nodeRadius * (depthRelative));"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\t//this.scale.setTarget(1); // TEMP"]
["\t\t\t"]
["\t\t\tif ( this == selectedNode )"]
["\t\t\t{"]
["\t\t\t\tthis.labelRadius.setTarget(0);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tif ( compress )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.labelRadius.setTarget"]
["\t\t\t\t\t("]
["\t\t\t\t\t\t(compressedRadii[depthRelative - 1] + compressedRadii[depthRelative]) / 2"]
["\t\t\t\t\t);"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.labelRadius.setTarget(nodeRadius * (depthRelative) + nodeRadius / 2);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["//\t\tthis.r.start = this.r.end;"]
["//\t\tthis.g.start = this.g.end;"]
["//\t\tthis.b.start = this.b.end;"]
["\t\t"]
["\t\tthis.r.setTarget(255);"]
["\t\tthis.g.setTarget(255);"]
["\t\tthis.b.setTarget(255);"]
[]
["\t\tthis.alphaLine.setTarget(0);"]
["\t\tthis.alphaArc.setTarget(0);"]
["\t\tthis.alphaWedge.setTarget(0);"]
["\t\tthis.alphaPattern.setTarget(0);"]
["\t\tthis.alphaOther.setTarget(0);"]
["\t\t"]
["\t\tif ( parentOfSelected && ! this.getCollapse() )"]
["\t\t{"]
["\t\t\tvar alpha ="]
["\t\t\t("]
["\t\t\t\t1 -"]
["\t\t\t\t(selectedNode.getDepth() - this.getDepth()) /"]
["\t\t\t\t(Math.floor((compress ? compressedRadii[0] : nodeRadius) * gRadius / (historySpacingFactor * fontSize) - .5) + 1)"]
["\t\t\t);"]
["\t\t\t"]
["\t\t\tif ( alpha < 0 )"]
["\t\t\t{"]
["\t\t\t\talpha = 0;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tthis.alphaLabel.setTarget(alpha);"]
["\t\t\tthis.radial = false;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tthis.alphaLabel.setTarget(0);"]
["\t\t}"]
["\t\t"]
["\t\tthis.hideAlonePrev = this.hideAlone;"]
["\t\tthis.hidePrev = this.hide;"]
["\t\t"]
["\t\tif ( parentOfSelected )"]
["\t\t{"]
["\t\t\tthis.hideAlone = false;"]
["\t\t\tthis.hide = false;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.getParent() == selectedNode.getParent() )"]
["\t\t{"]
["\t\t\tthis.hiddenEnd = null;"]
["\t\t}"]
["\t\t"]
["\t\tthis.radialPrev = this.radial;"]
["\t}"]
["\t"]
["\tthis.setTargetsSelected = function(hueMin, hueMax, lightness, hide, nextSiblingHidden)"]
["\t{"]
["\t\tvar collapse = this.getCollapse();"]
["\t\tvar depth = this.getDepth() - selectedNode.getDepth() + 1;"]
["\t\tvar canDisplayChildLabels = false;"]
["\t\tvar lastChild;"]
["\t\t"]
["\t\tif ( this.hasChildren() )//&& ! hide )"]
["\t\t{"]
["\t\t\tlastChild = this.children[this.children.length - 1];"]
["\t\t\tthis.hideAlone = true;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tthis.hideAlone = false;"]
["\t\t}"]
["\t\t"]
["\t\t// set child wedges"]
["\t\t//"]
["\t\tfor ( var i = 0; i < this.children.length; i++ )"]
["\t\t{"]
["\t\t\tthis.children[i].setTargetWedge();"]
["\t\t\t"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\t! this.children[i].hide &&"]
["\t\t\t\t( collapse || depth < maxDisplayDepth ) &&"]
["\t\t\t\tthis.depth < maxAbsoluteDepth"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tcanDisplayChildLabels = true;"]
["\t\t\t\tthis.hideAlone = false;"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( this == selectedNode || lastChild && lastChild.angleEnd.end < this.angleEnd.end - .01)"]
["\t\t{"]
["\t\t\tthis.hideAlone = false;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.hideAlonePrev == undefined )"]
["\t\t{"]
["\t\t\tthis.hideAlonePrev = this.hideAlone;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this == selectedNode )"]
["\t\t{"]
["\t\t\tvar otherArc = "]
["\t\t\t\tthis.children.length ?"]
["\t\t\t\t\tangleFactor *"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tthis.baseMagnitude + this.magnitude -"]
["\t\t\t\t\t\tlastChild.baseMagnitude - lastChild.magnitude"]
["\t\t\t\t\t)"]
["\t\t\t\t: this.baseMagnitude + this.magnitude;"]
["\t\t\tthis.canDisplayLabelOther ="]
["\t\t\t\tthis.children.length ?"]
["\t\t\t\t\totherArc *"]
["\t\t\t\t\t(this.children[0].radiusInner.end + 1) * gRadius >="]
["\t\t\t\t\tminWidth()"]
["\t\t\t\t: true;"]
["\t\t\t"]
["\t\t\tthis.keyUnclassified = false;"]
["\t\t\t"]
["\t\t\tif ( this.canDisplayLabelOther )"]
["\t\t\t{"]
["\t\t\t\tthis.angleOther = Math.PI * 2 - otherArc / 2;"]
["\t\t\t}"]
["\t\t\telse if ( otherArc > 0.0000000001 )"]
["\t\t\t{"]
["\t\t\t\tthis.keyUnclassified = true;"]
["\t\t\t\tkeys++;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tthis.angleStart.setTarget(0);"]
["\t\t\tthis.angleEnd.setTarget(Math.PI * 2);"]
["\t\t\t"]
["\t\t\tif ( this.children.length )"]
["\t\t\t{"]
["\t\t\t\tthis.radiusInner.setTarget(0);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tthis.radiusInner.setTarget(compressedRadii[0]);"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tthis.hidePrev = this.hide;"]
["\t\t\tthis.hide = false;"]
["\t\t\tthis.hideAlonePrev = this.hideAlone;"]
["\t\t\tthis.hideAlone = false;"]
["\t\t\tthis.keyed = false;"]
["\t\t}"]
["\t\t"]
["\t\tif ( hueMax - hueMin > 1 / 12 )"]
["\t\t{"]
["\t\t\thueMax = hueMin + 1 / 12;"]
["\t\t}"]
["\t\t"]
["\t\t// set lightness"]
["\t\t//"]
["\t\tif ( ! ( hide || this.hideAlone ) )"]
["\t\t{"]
["\t\t\tif ( useHue() )"]
["\t\t\t{"]
["\t\t\t\tlightness = (lightnessBase + lightnessMax) / 2;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tlightness = lightnessBase + (depth - 1) * lightnessFactor;"]
["\t\t\t\t"]
["\t\t\t\tif ( lightness > lightnessMax )"]
["\t\t\t\t{"]
["\t\t\t\t\tlightness = lightnessMax;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( hide )"]
["\t\t{"]
["\t\t\tthis.hide = true;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.hidePrev == undefined )"]
["\t\t{"]
["\t\t\tthis.hidePrev = this.hide;"]
["\t\t}"]
["\t\t"]
["\t\tvar hiddenStart = -1;"]
["\t\tvar hiddenHueNumer = 0;"]
["\t\tvar hiddenHueDenom = 0;"]
["\t\tvar i = 0;"]
["\t\t"]
["\t\tif ( ! this.hide )"]
["\t\t{"]
["\t\t\tthis.hiddenEnd = null;"]
["\t\t}"]
["\t\t"]
["\t\twhile ( true )"]
["\t\t{"]
["\t\t\tif ( ! this.hideAlone && ! hide && ( i == this.children.length || ! this.children[i].hide ) )"]
["\t\t\t{"]
["\t\t\t\t// reached a non-hidden child or the end; set targets for"]
["\t\t\t\t// previous group of hidden children (if any) using their"]
["\t\t\t\t// average hue"]
["\t\t\t\t"]
["\t\t\t\tif ( hiddenStart != -1 )"]
["\t\t\t\t{"]
["\t\t\t\t\tvar hiddenHue = hiddenHueDenom ? hiddenHueNumer / hiddenHueDenom : hueMin;"]
["\t\t\t\t\t"]
["\t\t\t\t\tfor ( var j = hiddenStart; j < i; j++ )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tthis.children[j].setTargetsSelected"]
["\t\t\t\t\t\t("]
["\t\t\t\t\t\t\thiddenHue,"]
["\t\t\t\t\t\t\tnull,"]
["\t\t\t\t\t\t\tlightness,"]
["\t\t\t\t\t\t\tfalse,"]
["\t\t\t\t\t\t\tj < i - 1"]
["\t\t\t\t\t\t);"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tthis.children[j].hiddenEnd = null;"]
["\t\t\t\t\t}"]
["\t\t\t\t\t"]
["\t\t\t\t\tthis.children[hiddenStart].hiddenEnd = i - 1;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( i == this.children.length )"]
["\t\t\t{"]
["\t\t\t\tbreak;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tvar child = this.children[i];"]
["\t\t\tvar childHueMin;"]
["\t\t\tvar childHueMax;"]
["\t\t\t"]
["\t\t\tif ( this.magnitude > 0 && ! this.hide && ! this.hideAlone )"]
["\t\t\t{"]
["\t\t\t\tif ( useHue() )"]
["\t\t\t\t{"]
["\t\t\t\t\tchildHueMin = child.hues[currentDataset];"]
["\t\t\t\t}"]
["\t\t\t\telse if ( this == selectedNode )"]
["\t\t\t\t{"]
["\t\t\t\t\tvar min = 0.0;"]
["\t\t\t\t\tvar max = 1.0;"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( this.children.length > 6 )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tchildHueMin = lerp((1 - Math.pow(1 - i / this.children.length, 1.4)) * .95, 0, 1, min, max);"]
["\t\t\t\t\t\tchildHueMax = lerp((1 - Math.pow(1 - (i + .55) / this.children.length, 1.4)) * .95, 0, 1, min, max);"]
["\t\t\t\t\t}"]
["\t\t\t\t\telse"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tchildHueMin = lerp(i / this.children.length, 0, 1, min, max);"]
["\t\t\t\t\t\tchildHueMax = lerp((i + .55) / this.children.length, 0, 1, min, max);"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tchildHueMin = lerp"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tchild.baseMagnitude,"]
["\t\t\t\t\t\tthis.baseMagnitude, "]
["\t\t\t\t\t\tthis.baseMagnitude + this.magnitude,"]
["\t\t\t\t\t\thueMin,"]
["\t\t\t\t\t\thueMax"]
["\t\t\t\t\t);"]
["\t\t\t\t\tchildHueMax = lerp"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tchild.baseMagnitude + child.magnitude * .99,"]
["\t\t\t\t\t\tthis.baseMagnitude,"]
["\t\t\t\t\t\tthis.baseMagnitude + this.magnitude,"]
["\t\t\t\t\t\thueMin,"]
["\t\t\t\t\t\thueMax"]
["\t\t\t\t\t);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tchildHueMin = hueMin;"]
["\t\t\t\tchildHueMax = hueMax;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tif ( ! this.hideAlone && ! hide && ! this.hide && child.hide )"]
["\t\t\t{"]
["\t\t\t\tif ( hiddenStart == -1 )"]
["\t\t\t\t{"]
["\t\t\t\t\thiddenStart = i;"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif ( useHue() )"]
["\t\t\t\t{"]
["\t\t\t\t\thiddenHueNumer += childHueMin * child.magnitude;"]
["\t\t\t\t\thiddenHueDenom += child.magnitude;"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\thiddenHueNumer += childHueMin;"]
["\t\t\t\t\thiddenHueDenom++;"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\thiddenStart = -1;"]
["\t\t\t\t"]
["\t\t\t\tthis.children[i].setTargetsSelected"]
["\t\t\t\t("]
["\t\t\t\t\tchildHueMin,"]
["\t\t\t\t\tchildHueMax,"]
["\t\t\t\t\tlightness,"]
["\t\t\t\t\thide || this.keyed || this.hideAlone || this.hide && ! collapse,"]
["\t\t\t\t\tfalse"]
["\t\t\t\t);"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\ti++;"]
["\t\t}"]
["\t\t"]
["\t \tif ( this.hue && this.magnitude )"]
["\t \t{"]
["\t\t \tthis.hue.setTarget(this.hues[currentDataset]);"]
["\t\t\t"]
["\t\t\tif ( this.attributes[magnitudeIndex][lastDataset] == 0 )"]
["\t\t\t{"]
["\t\t\t\tthis.hue.start = this.hue.end;"]
["\t\t\t}"]
["\t\t}"]
["\t \t"]
["\t\tthis.radialPrev = this.radial;"]
["\t\t"]
["\t\tif ( this == selectedNode )"]
["\t\t{"]
["\t\t\tthis.resetLabelWidth();"]
["\t\t\tthis.labelWidth.setTarget(this.nameWidth * labelWidthFudge);"]
["\t\t\tthis.alphaWedge.setTarget(0);"]
["\t\t\tthis.alphaLabel.setTarget(1);"]
["\t\t\tthis.alphaOther.setTarget(1);"]
["\t\t\tthis.alphaArc.setTarget(0);"]
["\t\t\tthis.alphaLine.setTarget(0);"]
["\t\t\tthis.alphaPattern.setTarget(0);"]
["\t\t\tthis.r.setTarget(255);"]
["\t\t\tthis.g.setTarget(255);"]
["\t\t\tthis.b.setTarget(255);"]
["\t\t\tthis.radial = false;"]
["\t\t\tthis.labelRadius.setTarget(0);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tvar rgb = hslToRgb"]
["\t\t\t("]
["\t\t\t\thueMin,"]
["\t\t\t\tsaturation,"]
["\t\t\t\tlightness"]
["\t\t\t);"]
["\t\t\t"]
["\t\t\tthis.r.setTarget(rgb.r);"]
["\t\t\tthis.g.setTarget(rgb.g);"]
["\t\t\tthis.b.setTarget(rgb.b);"]
["\t\t\tthis.alphaOther.setTarget(0);"]
["\t\t\t"]
["\t\t\tthis.alphaWedge.setTarget(1);"]
["\t\t\t"]
["\t\t\tif ( this.hide || this.hideAlone )"]
["\t\t\t{"]
["\t\t\t\tthis.alphaPattern.setTarget(1);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tthis.alphaPattern.setTarget(0);"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\t// set radial"]
["\t\t\t//"]
["\t\t\tif ( ! ( hide || this.hide ) )//&& ! this.keyed )"]
["\t\t\t{"]
["\t\t\t\tif ( this.hideAlone )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.radial = true;"]
["\t\t\t\t}"]
["\t\t\t\telse if ( false && canDisplayChildLabels )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.radial = false;"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.radial = true;"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( this.hasChildren() && depth < maxDisplayDepth )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tvar lastChild = this.children[this.children.length - 1];"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif"]
["\t\t\t\t\t\t("]
["\t\t\t\t\t\t\tlastChild.angleEnd.end == this.angleEnd.end ||"]
["\t\t\t\t\t\t\t("]
["\t\t\t\t\t\t\t\t(this.angleStart.end + this.angleEnd.end) / 2 -"]
["\t\t\t\t\t\t\t\tlastChild.angleEnd.end"]
["\t\t\t\t\t\t\t) * (this.radiusInner.end + 1) * gRadius * 2 <"]
["\t\t\t\t\t\t\tminWidth()"]
["\t\t\t\t\t\t)"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tthis.radial = false;"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\t// set alphaLabel"]
["\t\t\t//"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\tcollapse ||"]
["\t\t\t\thide ||"]
["\t\t\t\tthis.hide ||"]
["\t\t\t\tthis.keyed ||"]
["\t\t\t\tdepth > maxDisplayDepth ||"]
["\t\t\t\t! this.canDisplayDepth()"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tthis.alphaLabel.setTarget(0);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tif"]
["\t\t\t\t("]
["\t\t\t\t\t(this.radial || nLabelOffsets[depth - 2])"]
["\t\t\t\t)"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.alphaLabel.setTarget(1);"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.alphaLabel.setTarget(0);"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( this.radialPrev )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tthis.alphaLabel.start = 0;"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\t// set alphaArc"]
["\t\t\t//"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\tcollapse ||"]
["\t\t\t\thide ||"]
["\t\t\t\tdepth > maxDisplayDepth ||"]
["\t\t\t\t! this.canDisplayDepth()"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tthis.alphaArc.setTarget(0);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tthis.alphaArc.setTarget(1);"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\t// set alphaLine"]
["\t\t\t//"]
["\t\t\tif"]
["\t\t\t("]
["\t\t\t\thide ||"]
["\t\t\t\tthis.hide && nextSiblingHidden ||"]
["\t\t\t\tdepth > maxDisplayDepth ||"]
["\t\t\t\t! this.canDisplayDepth()"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\tthis.alphaLine.setTarget(0);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tthis.alphaLine.setTarget(1);"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\t//if (  ! this.radial )"]
["\t\t\t{"]
["\t\t\t\tthis.resetLabelWidth();"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\t// set labelRadius target"]
["\t\t\t//"]
["\t\t\tif ( collapse )"]
["\t\t\t{"]
["\t\t\t\tthis.labelRadius.setTarget(this.radiusInner.end);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tif ( depth > maxDisplayDepth || ! this.canDisplayDepth() )"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.labelRadius.setTarget(1);"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tthis.setTargetLabelRadius();"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.setTargetWedge = function()"]
["\t{"]
["\t\tvar depth = this.getDepth() - selectedNode.getDepth() + 1;"]
["\t\t"]
["\t\t// set angles"]
["\t\t//"]
["\t\tvar baseMagnitudeRelative = this.baseMagnitude - selectedNode.baseMagnitude;"]
["\t\t//"]
["\t\tthis.angleStart.setTarget(baseMagnitudeRelative * angleFactor);"]
["\t\tthis.angleEnd.setTarget((baseMagnitudeRelative + this.magnitude) * angleFactor);"]
["\t\t"]
["\t\t// set radiusInner"]
["\t\t//"]
["\t\tif ( depth > maxDisplayDepth || ! this.canDisplayDepth() )"]
["\t\t{"]
["\t\t\tthis.radiusInner.setTarget(1);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tif ( compress )"]
["\t\t\t{"]
["\t\t\t\tthis.radiusInner.setTarget(compressedRadii[depth - 2]);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tthis.radiusInner.setTarget(nodeRadius * (depth - 1));"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.hide != undefined )"]
["\t\t{"]
["\t\t\tthis.hidePrev = this.hide;"]
["\t\t}"]
["\t\t"]
["\t\tif ( this.hideAlone != undefined )"]
["\t\t{"]
["\t\t\tthis.hideAlonePrev = this.hideAlone;"]
["\t\t}"]
["\t\t"]
["\t\t// set hide"]
["\t\t//"]
["\t\tif"]
["\t\t("]
["\t\t\t(this.angleEnd.end - this.angleStart.end) *"]
["\t\t\t(this.radiusInner.end * gRadius + gRadius) <"]
["\t\t\tminWidth()"]
["\t\t)"]
["\t\t{"]
["\t\t\tif ( depth == 2 && ! this.getCollapse() && this.depth <= maxAbsoluteDepth )"]
["\t\t\t{"]
["\t\t\t\tthis.keyed = true;"]
["\t\t\t\tkeys++;"]
["\t\t\t\tthis.hide = false;"]
["\t\t\t\t"]
["\t\t\t\tvar percentage = this.getPercentage();"]
["\t\t\t\tthis.keyLabel = this.name + '   ' + percentage + '%';"]
["\t\t\t\tvar dim = context.measureText(this.keyLabel);"]
["\t\t\t\tthis.keyNameWidth = dim.width;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tthis.keyed = false;"]
["\t\t\t\tthis.hide = depth > 2;"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tthis.keyed = false;"]
["\t\t\tthis.hide = false;"]
["\t\t}"]
["\t}"]
["\t"]
["\tthis.shortenLabel = function()"]
["\t{"]
["\t\tvar label = this.name;"]
["\t\t"]
["\t\tvar labelWidth = this.nameWidth;"]
["\t\tvar maxWidth = this.labelWidth.current();"]
["\t\tvar minEndLength = 0;"]
["\t\t"]
["\t\tif ( labelWidth > maxWidth && label.length > minEndLength * 2 )"]
["\t\t{"]
["\t\t\tvar endLength ="]
["\t\t\t\tMath.floor((label.length - 1) * maxWidth / labelWidth / 2);"]
["\t\t\t"]
["\t\t\tif ( endLength < minEndLength )"]
["\t\t\t{"]
["\t\t\t\tendLength = minEndLength;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\treturn ("]
["\t\t\t\tlabel.substring(0, endLength) +"]
["\t\t\t\t'...' +"]
["\t\t\t\tlabel.substring(label.length - endLength));"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn label;"]
["\t\t}"]
["\t}"]
["\t"]
["/*\tthis.shouldAddSearchResultsString = function()"]
["\t{"]
["\t\tif ( this.isSearchResult )"]
["\t\t{"]
["\t\t\treturn this.searchResults > 1;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn this.searchResults > 0;"]
["\t\t}"]
["\t}"]
["*/\t"]
["\tthis.sort = function()"]
["\t{"]
["\t\tthis.children.sort(function(a, b){return b.getMagnitude() - a.getMagnitude()});"]
["\t\t"]
["\t\tfor (var i = 0; i < this.children.length; i++)"]
["\t\t{"]
["\t\t\tthis.children[i].sort();"]
["\t\t}"]
["\t}"]
["}"]
[]
["var options;"]
[]
["function addOptionElement(position, innerHTML, title)"]
["{"]
["\tvar div = document.createElement(\"div\");"]
["//\tdiv.style.position = 'absolute';"]
["//\tdiv.style.top = position + 'px';"]
["\tdiv.innerHTML = innerHTML;"]
["//\tdiv.style.display = 'block';"]
["\tdiv.style.padding = '2px';"]
["\t"]
["\tif ( title )"]
["\t{"]
["\t\tdiv.title = title;"]
["\t}"]
["\t"]
["\toptions.appendChild(div);"]
["\tvar height = 0;//div.clientHeight;"]
["\treturn position + height;"]
["}"]
[]
["function addOptionElements(hueName, hueDefault)"]
["{"]
["\toptions = document.createElement('div');"]
["\toptions.style.position = 'absolute';"]
["\toptions.style.top = '0px';"]
["\toptions.addEventListener('mousedown', function(e) {mouseClick(e)}, false);"]
["//\toptions.onmouseup = function(e) {mouseUp(e)}"]
["\tdocument.body.appendChild(options);"]
["\t"]
["\tdocument.body.style.font = '11px sans-serif';"]
["\tvar position = 5;"]
["\t"]
["\tdetails = document.createElement('div');"]
["\tdetails.style.position = 'absolute';"]
["\tdetails.style.top = '1%';"]
["\tdetails.style.right = '2%';"]
["\tdetails.style.textAlign = 'right';"]
["\tdocument.body.insertBefore(details, canvas);"]
["//\t\t<div id=\"details\" style=\"position:absolute;top:1%;right:2%;text-align:right;\">"]
[]
["\tdetails.innerHTML = '\\"]
["<span id=\"detailsName\" style=\"font-weight:bold\"></span>&nbsp;\\"]
["<input type=\"button\" id=\"detailsExpand\" onclick=\"expand(focusNode);\"\\"]
["value=\"&harr;\" title=\"Expand this wedge to become the new focus of the chart\"/><br/>\\"]
["<div id=\"detailsInfo\" style=\"float:right\"></div>';"]
[]
["\tkeyControl = document.createElement('input');"]
["\tkeyControl.type = 'button';"]
["\tkeyControl.value = showKeys ? 'x' : '...';"]
["\tkeyControl.style.position = '';"]
["\tkeyControl.style.position = 'fixed';"]
["\tkeyControl.style.visibility = 'hidden';"]
["\t"]
["\tdocument.body.insertBefore(keyControl, canvas);"]
["\t"]
["\tvar logoElement = document.getElementById('logo');"]
["\t"]
["\tif ( logoElement )"]
["\t{"]
["\t\tlogoImage = logoElement.src;"]
["\t}"]
["\telse"]
["\t{"]
["\t\tlogoImage = 'http://marbl.github.io/Krona/img/logo-med.png';"]
["\t}"]
["\t"]
["//\tdocument.getElementById('options').style.fontSize = '9pt';"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition,"]
["'<a style=\"margin:2px\" target=\"_blank\" href=\"https://github.com/marbl/Krona/wiki\"><img style=\"vertical-align:middle;width:108px;height:30px;\" src=\"' + logoImage + '\"/></a><input type=\"button\" id=\"back\" value=\"&larr;\" title=\"Go back (Shortcut: &larr;)\"/>\\"]
["<input type=\"button\" id=\"forward\" value=\"&rarr;\" title=\"Go forward (Shortcut: &rarr;)\"/> \\"]
["&nbsp;Search: <input type=\"text\" id=\"search\"/>\\"]
["<input id=\"searchClear\" type=\"button\" value=\"x\" onclick=\"clearSearch()\"/> \\"]
["<span id=\"searchResults\"></span>'"]
["\t);"]
["\t"]
["\tif ( datasets > 1 )"]
["\t{"]
["\t\tvar size = datasets < datasetSelectSize ? datasets : datasetSelectSize;"]
["\t\t"]
["\t\tvar select ="]
["\t\t\t'<table style=\"border-collapse:collapse;padding:0px\"><tr><td style=\"padding:0px\">' +"]
["\t\t\t'<select id=\"datasets\" style=\"min-width:100px\" size=\"' + size + '\" onchange=\"onDatasetChange()\">';"]
["\t\t"]
["\t\tfor ( var i = 0; i < datasetNames.length; i++ )"]
["\t\t{"]
["\t\t\tselect += '<option>' + datasetNames[i] + '</option>';"]
["\t\t}"]
["\t\t"]
["\t\tselect +="]
["\t\t\t'</select></td><td style=\"vertical-align:top;padding:1px;\">' +"]
["\t\t\t'<input style=\"display:block\" title=\"Previous dataset (Shortcut: &uarr;)\" id=\"prevDataset\" type=\"button\" value=\"&uarr;\" onclick=\"prevDataset()\" disabled=\"true\"/>' +"]
["\t\t\t'<input title=\"Next dataset (Shortcut: &darr;)\" id=\"nextDataset\" type=\"button\" value=\"&darr;\" onclick=\"nextDataset()\"/><br/></td>' +"]
["\t\t\t'<td style=\"padding-top:1px;vertical-align:top\"><input title=\"Switch to the last dataset that was viewed (Shortcut: TAB)\" id=\"lastDataset\" type=\"button\" style=\"font:11px Times new roman\" value=\"last\" onclick=\"selectLastDataset()\"/></td></tr></table>';"]
["\t\t"]
["\t\tposition = addOptionElement(position + 5, select);"]
["\t\t"]
["\t\tdatasetDropDown = document.getElementById('datasets');"]
["\t\tdatasetButtonLast = document.getElementById('lastDataset');"]
["\t\tdatasetButtonPrev = document.getElementById('prevDataset');"]
["\t\tdatasetButtonNext = document.getElementById('nextDataset');"]
["\t\t"]
["\t\tposition += datasetDropDown.clientHeight;"]
["\t}"]
["\t"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition + 5,"]
["'<input type=\"button\" id=\"maxAbsoluteDepthDecrease\" value=\"-\"/>\\"]
["<span id=\"maxAbsoluteDepth\"></span>\\"]
["&nbsp;<input type=\"button\" id=\"maxAbsoluteDepthIncrease\" value=\"+\"/> Max depth',"]
["'Maximum depth to display, counted from the top level \\"]
["and including collapsed wedges.'"]
["\t);"]
["\t"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition,"]
["'<input type=\"button\" id=\"fontSizeDecrease\" value=\"-\"/>\\"]
["<span id=\"fontSize\"></span>\\"]
["&nbsp;<input type=\"button\" id=\"fontSizeIncrease\" value=\"+\"/> Font size'"]
["\t);"]
["\t"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition,"]
["'<input type=\"button\" id=\"radiusDecrease\" value=\"-\"/>\\"]
["<input type=\"button\" id=\"radiusIncrease\" value=\"+\"/> Chart size'"]
["\t);"]
["\t"]
["\tif ( hueName )"]
["\t{"]
["\t\thueDisplayName = attributes[attributeIndex(hueName)].displayName;"]
["\t\t"]
["\t\tposition = addOptionElement"]
["\t\t("]
["\t\t\tposition + 5,"]
["\t\t\t'<input type=\"checkbox\" id=\"useHue\" style=\"float:left\" ' +"]
["\t\t\t'/><div>Color by<br/>' + hueDisplayName +"]
["\t\t\t'</div>'"]
["\t\t);"]
["\t\t"]
["\t\tuseHueCheckBox = document.getElementById('useHue');"]
["\t\tuseHueCheckBox.checked = hueDefault;"]
["\t\tuseHueCheckBox.onclick = handleResize;"]
["\t\tuseHueCheckBox.onmousedown = suppressEvent;"]
["\t}"]
["\t/*"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition + 5,"]
["\t\t'&nbsp;<input type=\"checkbox\" id=\"shorten\" checked=\"checked\" />Shorten labels</div>',"]
["\t\t'Prevent labels from overlapping by shortening them'"]
["\t);"]
["\t"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition,"]
["\t\t'&nbsp;<input type=\"checkbox\" id=\"compress\" checked=\"checked\" />Compress',"]
["\t\t'Compress wedges if needed to show the entire depth'"]
["\t);"]
["\t*/"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition,"]
["\t\t'<input type=\"checkbox\" id=\"collapse\" checked=\"checked\" />Collapse',"]
["\t\t'Collapse wedges that are redundant (entirely composed of another wedge)'"]
["\t);"]
["\t"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition + 5,"]
["\t\t'<input type=\"button\" id=\"snapshot\" value=\"Snapshot\"/>',"]
["'Render the current view as SVG (Scalable Vector Graphics), a publication-\\"]
["quality format that can be printed and saved (see Help for browser compatibility)'"]
["\t);"]
["\t"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition + 5,"]
["'<input type=\"button\" id=\"linkButton\" value=\"Link\"/>\\"]
["<input type=\"text\" size=\"30\" id=\"linkText\"/>',"]
["'Show a link to this view that can be copied for bookmarking or sharing'"]
["\t);"]
["\t"]
["\tposition = addOptionElement"]
["\t("]
["\t\tposition + 5,"]
["'<input type=\"button\" id=\"help\" value=\"?\"\\"]
["onclick=\"window.open(\\'https://github.com/marbl/Krona/wiki/Browsing%20Krona%20charts\\', \\'help\\')\"/>',"]
["'Help'"]
["\t);"]
["}"]
[]
["function arrow(angleStart, angleEnd, radiusInner)"]
["{"]
["\tif ( context.globalAlpha == 0 )"]
["\t{"]
["\t\treturn;"]
["\t}"]
["\t"]
["\tvar angleCenter = (angleStart + angleEnd) / 2;"]
["\tvar radiusArrowInner = radiusInner - gRadius / 10;//nodeRadius * gRadius;"]
["\tvar radiusArrowOuter = gRadius * 1.1;//(1 + nodeRadius);"]
["\tvar radiusArrowCenter = (radiusArrowInner + radiusArrowOuter) / 2;"]
["\tvar pointLength = (radiusArrowOuter - radiusArrowInner) / 5;"]
["\t"]
["\tcontext.fillStyle = highlightFill;"]
["\tcontext.lineWidth = highlightLineWidth;"]
["\t"]
["\t// First, mask out the first half of the arrow.  This will prevent the tips"]
["\t// from superimposing if the arrow goes most of the way around the circle."]
["\t// Masking is done by setting the clipping region to the inverse of the"]
["\t// half-arrow, which is defined by cutting the half-arrow out of a large"]
["\t// rectangle"]
["\t//"]
["\tcontext.beginPath();"]
["\tcontext.arc(0, 0, radiusInner, angleCenter, angleEnd, false);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowInner * Math.cos(angleEnd),"]
["\t\tradiusArrowInner * Math.sin(angleEnd)"]
["\t);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowCenter * Math.cos(angleEnd) - pointLength * Math.sin(angleEnd),"]
["\t\tradiusArrowCenter * Math.sin(angleEnd) + pointLength * Math.cos(angleEnd)"]
["\t);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowOuter * Math.cos(angleEnd),"]
["\t\tradiusArrowOuter * Math.sin(angleEnd)"]
["\t);"]
["\tcontext.arc(0, 0, gRadius, angleEnd, angleCenter, true);"]
["\tcontext.closePath();"]
["\tcontext.moveTo(-imageWidth, -imageHeight);"]
["\tcontext.lineTo(imageWidth, -imageHeight);"]
["\tcontext.lineTo(imageWidth, imageHeight);"]
["\tcontext.lineTo(-imageWidth, imageHeight);"]
["\tcontext.closePath();"]
["\tcontext.save();"]
["\tcontext.clip();"]
["\t"]
["\t// Next, draw the other half-arrow with the first half masked out"]
["\t//"]
["\tcontext.beginPath();"]
["\tcontext.arc(0, 0, radiusInner, angleCenter, angleStart, true);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowInner * Math.cos(angleStart),"]
["\t\tradiusArrowInner * Math.sin(angleStart)"]
["\t);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowCenter * Math.cos(angleStart) + pointLength * Math.sin(angleStart),"]
["\t\tradiusArrowCenter * Math.sin(angleStart) - pointLength * Math.cos(angleStart)"]
["\t);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowOuter * Math.cos(angleStart),"]
["\t\tradiusArrowOuter * Math.sin(angleStart)"]
["\t);"]
["\tcontext.arc(0, 0, gRadius, angleStart, angleCenter, false);"]
["\tcontext.fill();"]
["\tcontext.stroke();"]
["\t"]
["\t// Finally, remove the clipping region and draw the first half-arrow.  This"]
["\t// half is extended slightly to fill the seam."]
["\t//"]
["\tcontext.restore();"]
["\tcontext.beginPath();"]
["\tcontext.arc(0, 0, radiusInner, angleCenter - 2 / (2 * Math.PI * radiusInner), angleEnd, false);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowInner * Math.cos(angleEnd),"]
["\t\tradiusArrowInner * Math.sin(angleEnd)"]
["\t);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowCenter * Math.cos(angleEnd) - pointLength * Math.sin(angleEnd),"]
["\t\tradiusArrowCenter * Math.sin(angleEnd) + pointLength * Math.cos(angleEnd)"]
["\t);"]
["\tcontext.lineTo"]
["\t("]
["\t\tradiusArrowOuter * Math.cos(angleEnd),"]
["\t\tradiusArrowOuter * Math.sin(angleEnd)"]
["\t);"]
["\tcontext.arc(0, 0, gRadius, angleEnd, angleCenter - 2 / (2 * Math.PI * gRadius), true);"]
["\tcontext.fill();"]
["\tcontext.stroke();"]
["}"]
[]
["function attributeIndex(aname)"]
["{"]
["\tfor ( var i = 0 ; i < attributes.length; i++ )"]
["\t{"]
["\t\tif ( aname == attributes[i].name )"]
["\t\t{"]
["\t\t\treturn i;"]
["\t\t}"]
["\t}"]
["\t"]
["\treturn null;"]
["}"]
[]
["function checkHighlight()"]
["{"]
["\tvar lastHighlightedNode = highlightedNode;"]
["\tvar lastHighlightingHidden = highlightingHidden;"]
["\t"]
["\thighlightedNode = selectedNode;"]
["\tresetKeyOffset();"]
["\t"]
["\tif ( progress == 1 )"]
["\t{"]
["\t\tselectedNode.checkHighlight();"]
["\t\tif ( selectedNode.getParent() )"]
["\t\t{"]
["\t\t\tselectedNode.getParent().checkHighlightCenter();"]
["\t\t}"]
["\t\t"]
["\t\tfocusNode.checkHighlightMap();"]
["\t}"]
["\t"]
["\tif ( highlightedNode != selectedNode )"]
["\t{"]
["\t\tif ( highlightedNode == focusNode )"]
["\t\t{"]
["//\t\t\tcanvas.style.display='none';"]
["//\t\t\twindow.resizeBy(1,0);"]
["//\t\t\tcanvas.style.cursor='ew-resize';"]
["//\t\t\twindow.resizeBy(-1,0);"]
["//\t\t\tcanvas.style.display='inline';"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["//\t\t\tcanvas.style.cursor='pointer';"]
["\t\t}"]
["\t}"]
["\telse"]
["\t{"]
["//\t\tcanvas.style.cursor='auto';"]
["\t}"]
["\t"]
["\tif"]
["\t("]
["\t\t("]
["\t\t\ttrue ||"]
["\t\t\thighlightedNode != lastHighlightedNode ||"]
["\t\t\thighlightingHidden != highlightingHiddenLast"]
["\t\t) &&"]
["\t\tprogress == 1"]
["\t)"]
["\t{"]
["\t\tdraw(); // TODO: handle in update()"]
["\t}"]
["}"]
[]
["function checkSelectedCollapse()"]
["{"]
["\tvar newNode = selectedNode;"]
["\t"]
["\twhile ( newNode.getCollapse() )"]
["\t{"]
["\t\tnewNode = newNode.children[0];"]
["\t}"]
["\t"]
["\tif ( newNode.children.length == 0 && newNode.getParent() )"]
["\t{"]
["\t\tnewNode = newNode.getParent();"]
["\t}"]
["\t"]
["\tif ( newNode != selectedNode )"]
["\t{"]
["\t\tselectNode(newNode);"]
["\t}"]
["}"]
[]
["function clearSearch()"]
["{"]
["\tif ( search.value != '' )"]
["\t{"]
["\t\tsearch.value = '';"]
["\t\tonSearchChange();"]
["\t}"]
["}"]
[]
["function createSVG()"]
["{"]
["\tsvgNS = \"http://www.w3.org/2000/svg\";"]
["\tvar SVG = {};"]
["\tSVG.xlinkns = \"http://www.w3.org/1999/xlink\";"]
["\t"]
["\tvar newSVG = document.createElementNS(svgNS, \"svg:svg\");"]
["\t"]
["\tnewSVG.setAttribute(\"id\", \"canvas\");"]
["\t// How big is the canvas in pixels"]
["\tnewSVG.setAttribute(\"width\", '100%');"]
["\tnewSVG.setAttribute(\"height\", '100%');"]
["\t// Set the coordinates used by drawings in the canvas"]
["//\tnewSVG.setAttribute(\"viewBox\", \"0 0 \" + imageWidth + \" \" + imageHeight);"]
["\t// Define the XLink namespace that SVG uses"]
["\tnewSVG.setAttributeNS"]
["\t("]
["\t\t\"http://www.w3.org/2000/xmlns/\","]
["\t\t\"xmlns:xlink\","]
["\t\tSVG.xlinkns"]
["\t);"]
["\t"]
["\treturn newSVG;"]
["}"]
[]
["function degrees(radians)"]
["{"]
["\treturn radians * 180 / Math.PI;"]
["}"]
[]
["function draw()"]
["{"]
["\ttweenFrames++;"]
["\t//resize();"]
["//\tcontext.fillRect(0, 0, imageWidth, imageHeight);"]
["\tcontext.clearRect(0, 0, imageWidth, imageHeight);"]
["\t"]
["\tcontext.font = fontNormal;"]
["\tcontext.textBaseline = 'middle';"]
["\t"]
["\t//context.strokeStyle = 'rgba(0, 0, 0, 0.3)';"]
["\tcontext.translate(centerX, centerY);"]
["\t"]
["\tresetKeyOffset();"]
["\t"]
["\thead.draw(false, false); // draw pie slices"]
["\thead.draw(true, false); // draw labels"]
["\t"]
["\tvar pathRoot = selectedNode;"]
["\t"]
["\tif ( focusNode != 0 && focusNode != selectedNode )"]
["\t{"]
["\t\tcontext.globalAlpha = 1;"]
["\t\tfocusNode.drawHighlight(true);"]
["\t\tpathRoot = focusNode;"]
["\t}"]
["\t"]
["\tif"]
["\t("]
["\t\thighlightedNode &&"]
["\t\thighlightedNode.getDepth() >= selectedNode.getDepth() &&"]
["\t\thighlightedNode != focusNode"]
["\t)"]
["\t{"]
["\t\tif"]
["\t\t("]
["\t\t\tprogress == 1 &&"]
["\t\t\thighlightedNode != selectedNode &&"]
["\t\t\t("]
["\t\t\t\thighlightedNode != focusNode ||"]
["\t\t\t\tfocusNode.children.length > 0"]
["\t\t\t)"]
["\t\t)"]
["\t\t{"]
["\t\t\tcontext.globalAlpha = 1;"]
["\t\t\thighlightedNode.drawHighlight(true);"]
["\t\t}"]
["\t\t"]
["\t\t//pathRoot = highlightedNode;"]
["\t}"]
["\telse if"]
["\t("]
["\t\tprogress == 1 &&"]
["\t\thighlightedNode.getDepth() < selectedNode.getDepth()"]
["\t)"]
["\t{"]
["\t\tcontext.globalAlpha = 1;"]
["\t\thighlightedNode.drawHighlightCenter();"]
["\t}"]
["\t"]
["\tif ( quickLook && false) // TEMP"]
["\t{"]
["\t\tcontext.globalAlpha = 1 - progress / 2;"]
["\t\tselectedNode.drawHighlight(true);"]
["\t}"]
["\telse if ( progress < 1 )//&& zoomOut() )"]
["\t{"]
["\t\tif ( !zoomOut)//() )"]
["\t\t{"]
["\t\t\tcontext.globalAlpha = selectedNode.alphaLine.current();"]
["\t\t\tselectedNode.drawHighlight(true);"]
["\t\t}"]
["\t\telse if ( selectedNodeLast )"]
["\t\t{"]
["\t\t\tcontext.globalAlpha = 1 - 4 * Math.pow(progress - .5, 2);"]
["\t\t\tselectedNodeLast.drawHighlight(false);"]
["\t\t}"]
["\t}"]
["\t"]
["\tdrawDatasetName();"]
["\t"]
["\t//drawHistory();"]
["\t"]
["\tcontext.translate(-centerX, -centerY);"]
["\tcontext.globalAlpha = 1;"]
["\t"]
["\tmapRadius ="]
["\t\t(imageHeight / 2 - details.clientHeight - details.offsetTop) /"]
["\t\t(pathRoot.getDepth() - 1) * 3 / 4 / 2;"]
["\t"]
["\tif ( mapRadius > maxMapRadius )"]
["\t{"]
["\t\tmapRadius = maxMapRadius;"]
["\t}"]
["\t"]
["\tmapBuffer = mapRadius / 2;"]
["\t"]
["\t//context.font = fontNormal;"]
["\tpathRoot.drawMap(pathRoot);"]
["\t"]
["\tif ( hueDisplayName && useHue() )"]
["\t{"]
["\t\tdrawLegend();"]
["\t}"]
["}"]
[]
["function drawBubble(angle, radius, width, radial, flip)"]
["{"]
["\tvar height = fontSize * 2;"]
["\tvar x;"]
["\tvar y;"]
["\t"]
["\twidth = width + fontSize;"]
["\t"]
["\tif ( radial )"]
["\t{"]
["\t\ty = -fontSize;"]
["\t\t"]
["\t\tif ( flip )"]
["\t\t{"]
["\t\t\tx = radius - width + fontSize / 2;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tx = radius - fontSize / 2;"]
["\t\t}"]
["\t}"]
["\telse"]
["\t{"]
["\t\tx = -width / 2;"]
["\t\ty = -radius - fontSize;"]
["\t}"]
["\t"]
["\tif ( snapshotMode )"]
["\t{"]
["\t\tdrawBubbleSVG(x + centerX, y + centerY, width, height, fontSize, angle);"]
["\t}"]
["\telse"]
["\t{"]
["\t\tdrawBubbleCanvas(x, y, width, height, fontSize, angle);"]
["\t}"]
["}"]
[]
["function drawBubbleCanvas(x, y, width, height, radius, rotation)"]
["{"]
["\tcontext.strokeStyle = 'black';"]
["\tcontext.lineWidth = highlightLineWidth;"]
["\tcontext.fillStyle = 'rgba(255, 255, 255, .75)';"]
["\tcontext.rotate(rotation);"]
["\troundedRectangle(x, y, width, fontSize * 2, fontSize);"]
["\tcontext.fill();"]
["\tcontext.stroke();"]
["\tcontext.rotate(-rotation);"]
["}"]
[]
["function drawBubbleSVG(x, y, width, height, radius, rotation)"]
["{"]
["\tsvg +="]
["\t\t'<rect x=\"' + x + '\" y=\"' + y +"]
["\t\t'\" width=\"' + width +"]
["\t\t'\" height=\"' + height +"]
["\t\t'\" rx=\"' + radius +"]
["\t\t'\" ry=\"' + radius +"]
["\t\t'\" fill=\"rgba(255, 255, 255, .75)' +"]
["\t\t'\" class=\"highlight\" ' +"]
["\t\t'transform=\"rotate(' +"]
["\t\tdegrees(rotation) + ',' + centerX + ',' + centerY +"]
["\t\t')\"/>';"]
["}"]
[]
["function drawDatasetName()"]
["{"]
["\tvar alpha = datasetAlpha.current();"]
["\t"]
["\tif ( alpha > 0 )"]
["\t{"]
["\t\tvar radius = gRadius * compressedRadii[0] / -2;"]
["\t\t"]
["\t\tif ( alpha > 1 )"]
["\t\t{"]
["\t\t\talpha = 1;"]
["\t\t}"]
["\t\t"]
["\t\tcontext.globalAlpha = alpha;"]
["\t\t"]
["\t\tdrawBubble(0, -radius, datasetWidths[currentDataset], false, false);"]
["\t\tdrawText(datasetNames[currentDataset], 0, radius, 0, 'center', true);"]
["\t}"]
["}"]
[]
["function drawHistory()"]
["{"]
["\tvar alpha = 1;"]
["\tcontext.textAlign = 'center';"]
["\t"]
["\tfor ( var i = 0; i < nodeHistoryPosition && alpha > 0; i++ )"]
["\t{"]
["\t\t"]
["\t\tcontext.globalAlpha = alpha - historyAlphaDelta * tweenFactor;"]
["\t\tcontext.fillText"]
["\t\t("]
["\t\t\tnodeHistory[nodeHistoryPosition - i - 1].name,"]
["\t\t\t0,"]
["\t\t\t(i + tweenFactor) * historySpacingFactor * fontSize - 1"]
["\t\t);"]
["\t\t"]
["\t\tif ( alpha > 0 )"]
["\t\t{"]
["\t\t\talpha -= historyAlphaDelta;"]
["\t\t}"]
["\t}"]
["\t"]
["\tcontext.globalAlpha = 1;"]
["}"]
[]
["function drawLegend()"]
["{"]
["\tvar left = imageWidth * .01;"]
["\tvar width = imageHeight * .0265;"]
["\tvar height = imageHeight * .15;"]
["\tvar top = imageHeight - fontSize * 3.5 - height;"]
["\tvar textLeft = left + width + fontSize / 2;"]
["\t"]
["\tcontext.fillStyle = 'black';"]
["\tcontext.textAlign = 'start';"]
["\tcontext.font = fontNormal;"]
["//\tcontext.fillText(valueStartText, textLeft, top + height);"]
["//\tcontext.fillText(valueEndText, textLeft, top);"]
["\tcontext.fillText(hueDisplayName, left, imageHeight - fontSize * 1.5);"]
["\t"]
["\tvar gradient = context.createLinearGradient(0, top + height, 0, top);"]
["\t"]
["\tfor ( var i = 0; i < hueStopPositions.length; i++ )"]
["\t{"]
["\t\tgradient.addColorStop(hueStopPositions[i], hueStopHsl[i]);"]
["\t\t"]
["\t\tvar textY = top + (1 - hueStopPositions[i]) * height;"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\ti == 0 ||"]
["\t\t\ti == hueStopPositions.length - 1 ||"]
["\t\t\ttextY > top + fontSize && textY < top + height - fontSize"]
["\t\t)"]
["\t\t{"]
["\t\t\tcontext.fillText(hueStopText[i], textLeft, textY);"]
["\t\t}"]
["\t}"]
["\t"]
["\tcontext.fillStyle = gradient;"]
["\tcontext.fillRect(left, top, width, height);"]
["\tcontext.lineWidth = thinLineWidth;"]
["\tcontext.strokeRect(left, top, width, height);"]
["}"]
[]
["function drawLegendSVG()"]
["{"]
["\tvar left = imageWidth * .01;"]
["\tvar width = imageHeight * .0265;"]
["\tvar height = imageHeight * .15;"]
["\tvar top = imageHeight - fontSize * 3.5 - height;"]
["\tvar textLeft = left + width + fontSize / 2;"]
[]
["\tvar text = '';"]
["\t"]
["\ttext += svgText(hueDisplayName, left, imageHeight - fontSize * 1.5);"]
["\t"]
["\tvar svgtest = '<linearGradient id=\"gradient\" x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">';"]
["\t"]
["\tfor ( var i = 0; i < hueStopPositions.length; i++ )"]
["\t{"]
["\t\tsvgtest +="]
["\t\t\t'<stop offset=\"' + round(hueStopPositions[i] * 100) +"]
["\t\t\t'%\" style=\"stop-color:' + hueStopHsl[i] + '\"/>';"]
["\t\t"]
["\t\tvar textY = top + (1 - hueStopPositions[i]) * height;"]
["\t\t"]
["\t\tif"]
["\t\t("]
["\t\t\ti == 0 ||"]
["\t\t\ti == hueStopPositions.length - 1 ||"]
["\t\t\ttextY > top + fontSize && textY < top + height - fontSize"]
["\t\t)"]
["\t\t{"]
["\t\t\ttext += svgText(hueStopText[i], textLeft, textY);"]
["\t\t}"]
["\t}"]
["\t"]
["\tsvgtest += '</linearGradient>';"]
["\t//alert(svgtest);"]
["\tsvg += svgtest;"]
["\tsvg +="]
["\t\t'<rect style=\"fill:url(#gradient)\" x=\"' + left + '\" y=\"' + top +"]
["\t\t'\" width=\"' + width + '\" height=\"' + height + '\"/>';"]
["\t"]
["\tsvg += text;"]
["}"]
[]
["function drawSearchHighlights(label, bubbleX, bubbleY, rotation, center)"]
["{"]
["\tvar index = -1;"]
["\tvar labelLength = label.length;"]
["\t"]
["\tbubbleX -= fontSize / 4;"]
["\t"]
["\tdo"]
["\t{"]
["\t\tindex = label.toLowerCase().indexOf(search.value.toLowerCase(), index + 1);"]
["\t\t"]
["\t\tif ( index != -1 && index < labelLength )"]
["\t\t{"]
["\t\t\tvar dim = context.measureText(label.substr(0, index));"]
["\t\t\tvar x = bubbleX + dim.width;"]
["\t\t\t"]
["\t\t\tdim = context.measureText(label.substr(index, search.value.length));"]
["\t\t\t"]
["\t\t\tvar y = bubbleY - fontSize * 3 / 4;"]
["\t\t\tvar width = dim.width + fontSize / 2;"]
["\t\t\tvar height = fontSize * 3 / 2;"]
["\t\t\tvar radius = fontSize / 2;"]
["\t\t\t"]
["\t\t\tif ( snapshotMode )"]
["\t\t\t{"]
["\t\t\t\tif ( center )"]
["\t\t\t\t{"]
["\t\t\t\t\tx += centerX;"]
["\t\t\t\t\ty += centerY;"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tsvg +="]
["\t\t\t\t\t'<rect x=\"' + x + '\" y=\"' + y +"]
["\t\t\t\t\t'\" width=\"' + width +"]
["\t\t\t\t\t'\" height=\"' + height +"]
["\t\t\t\t\t'\" rx=\"' + radius +"]
["\t\t\t\t\t'\" ry=\"' + radius +"]
["\t\t\t\t\t'\" class=\"searchHighlight' +"]
["\t\t\t\t\t'\" transform=\"rotate(' +"]
["\t\t\t\t\tdegrees(rotation) + ',' + centerX + ',' + centerY +"]
["\t\t\t\t\t')\"/>';"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tcontext.fillStyle = 'rgb(255, 255, 100)';"]
["\t\t\t\tcontext.rotate(rotation);"]
["\t\t\t\troundedRectangle(x, y, width, height, radius);"]
["\t\t\t\tcontext.fill();"]
["\t\t\t\tcontext.rotate(-rotation);"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\twhile ( index != -1 && index < labelLength );"]
["}"]
[]
["function drawText(text, x, y, angle, anchor, bold, color)"]
["{"]
["\tif ( color == undefined )"]
["\t{"]
["\t\tcolor = 'black';"]
["\t}"]
["\t"]
["\tif ( snapshotMode )"]
["\t{"]
["\t\tsvg +="]
["\t\t\t'<text x=\"' + (centerX + x) + '\" y=\"' + (centerY + y) +"]
["\t\t\t'\" text-anchor=\"' + anchor + '\" style=\"font-color:' + color + ';font-weight:' + (bold ? 'bold' : 'normal') +"]
["\t\t\t'\" transform=\"rotate(' + degrees(angle) + ',' + centerX + ',' + centerY + ')\">' +"]
["\t\t\ttext + '</text>';"]
["\t}"]
["\telse"]
["\t{"]
["\t\tcontext.fillStyle = color;"]
["\t\tcontext.textAlign = anchor;"]
["\t\tcontext.font = bold ? fontBold : fontNormal;"]
["\t\tcontext.rotate(angle);"]
["\t\tcontext.fillText(text, x, y);"]
["\t\tcontext.rotate(-angle);"]
["\t}"]
["}"]
[]
["function drawTextPolar"]
["("]
["\ttext,"]
["\tinnerText,"]
["\tangle,"]
["\tradius,"]
["\tradial,"]
["\tbubble,"]
["\tbold, "]
["\tsearchResult,"]
["\tsearchResults"]
[")"]
["{"]
["\tvar anchor;"]
["\tvar textX;"]
["\tvar textY;"]
["\tvar spacer;"]
["\tvar totalText = text;"]
["\tvar flip;"]
["\t"]
["\tif ( snapshotMode )"]
["\t{"]
["\t\tspacer = '&#160;&#160;&#160;';"]
["\t}"]
["\telse"]
["\t{"]
["\t\tspacer = '   ';"]
["\t}"]
["\t"]
["\tif ( radial )"]
["\t{"]
["\t\tflip = angle < 3 * Math.PI / 2;"]
["\t\t"]
["\t\tif ( flip )"]
["\t\t{"]
["\t\t\tangle -= Math.PI;"]
["\t\t\tradius = -radius;"]
["\t\t\tanchor = 'end';"]
["\t\t\t"]
["\t\t\tif ( innerText )"]
["\t\t\t{"]
["\t\t\t\ttotalText = text + spacer + innerText;"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tanchor = 'start';"]
["\t\t\t"]
["\t\t\tif ( innerText )"]
["\t\t\t{"]
["\t\t\t\ttotalText = innerText + spacer + text;"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\ttextX = radius;"]
["\t\ttextY = 0;"]
["\t}"]
["\telse"]
["\t{"]
["\t\tflip = angle < Math.PI || angle > 2 * Math.PI;"]
["\t\tvar label;"]
["\t\t"]
["\t\tanchor = snapshotMode ? 'middle' : 'center';"]
["\t\t"]
["\t\tif ( flip )"]
["\t\t{"]
["\t\t\tangle -= Math.PI;"]
["\t\t\tradius = -radius;"]
["\t\t}"]
["\t\t"]
["\t\tangle += Math.PI / 2;"]
["\t\ttextX = 0;"]
["\t\ttextY = -radius;"]
["\t}"]
["\t"]
["\tif ( bubble )"]
["\t{"]
["\t\tvar textActual = totalText;"]
["\t\t"]
["\t\tif ( innerText && snapshotMode )"]
["\t\t{"]
["\t\t\tif ( flip )"]
["\t\t\t{"]
["\t\t\t\ttextActual = text + '   ' + innerText;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\ttextActual = innerText + '   ' + text;"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tif ( searchResults )"]
["\t\t{"]
["\t\t\ttextActual = textActual + searchResultString(searchResults);"]
["\t\t}"]
["\t\t"]
["\t\tvar textWidth = measureText(textActual, bold);"]
["\t\t"]
["\t\tvar x = textX;"]
["\t\t"]
["\t\tif ( anchor == 'end' )"]
["\t\t{"]
["\t\t\tx -= textWidth;"]
["\t\t}"]
["\t\telse if ( anchor != 'start' )"]
["\t\t{"]
["\t\t\t// centered"]
["\t\t\tx -= textWidth / 2;"]
["\t\t}"]
["\t\t"]
["\t\tdrawBubble(angle, radius, textWidth, radial, flip);"]
["\t\t"]
["\t\tif ( searchResult )"]
["\t\t{"]
["\t\t\tdrawSearchHighlights"]
["\t\t\t("]
["\t\t\t\ttextActual,"]
["\t\t\t\tx,"]
["\t\t\t\ttextY,"]
["\t\t\t\tangle,"]
["\t\t\t\ttrue"]
["\t\t\t)"]
["\t\t}"]
["\t}"]
["\t"]
["\tif ( searchResults )"]
["\t{"]
["\t\ttotalText = totalText + searchResultString(searchResults);"]
["\t}"]
["\t"]
["\tdrawText(totalText, textX, textY, angle, anchor, bold);"]
["\t"]
["\treturn flip;"]
["}"]
[]
["function drawTick(start, length, angle)"]
["{"]
["\tif ( snapshotMode )"]
["\t{"]
["\t\tsvg +="]
["\t\t\t'<line x1=\"' + (centerX + start) +"]
["\t\t\t'\" y1=\"' + centerY +"]
["\t\t\t'\" x2=\"' + (centerX + start + length) +"]
["\t\t\t'\" y2=\"' + centerY +"]
["\t\t\t'\" class=\"tick\" transform=\"rotate(' +"]
["\t\t\tdegrees(angle) + ',' + centerX + ',' + centerY +"]
["\t\t\t')\"/>';"]
["\t}"]
["\telse"]
["\t{"]
["\t\tcontext.rotate(angle);"]
["\t\tcontext.beginPath();"]
["\t\tcontext.moveTo(start, 0);"]
["\t\tcontext.lineTo(start + length, 0);"]
["\t\tcontext.lineWidth = thinLineWidth * 2;"]
["\t\tcontext.stroke();"]
["\t\tcontext.rotate(-angle);"]
["\t}"]
["}"]
[]
["function drawWedge"]
["("]
["\tangleStart,"]
["\tangleEnd,"]
["\tradiusInner,"]
["\tradiusOuter,"]
["\tcolor,"]
["\tpatternAlpha,"]
["\thighlight"]
[")"]
["{"]
["\tif ( context.globalAlpha == 0 )"]
["\t{"]
["\t\treturn;"]
["\t}"]
["\t"]
["\tif ( snapshotMode )"]
["\t{"]
["\t\tif ( angleEnd == angleStart + Math.PI * 2 )"]
["\t\t{"]
["\t\t\t// fudge to prevent overlap, which causes arc ambiguity"]
["\t\t\t//"]
["\t\t\tangleEnd -= .1 / gRadius;"]
["\t\t}"]
["\t\t"]
["\t\tvar longArc = angleEnd - angleStart > Math.PI ? 1 : 0;"]
["\t\t"]
["\t\tvar x1 = centerX + radiusInner * Math.cos(angleStart);"]
["\t\tvar y1 = centerY + radiusInner * Math.sin(angleStart);"]
["\t\t"]
["\t\tvar x2 = centerX + gRadius * Math.cos(angleStart);"]
["\t\tvar y2 = centerY + gRadius * Math.sin(angleStart);"]
["\t\t"]
["\t\tvar x3 = centerX + gRadius * Math.cos(angleEnd);"]
["\t\tvar y3 = centerY + gRadius * Math.sin(angleEnd);"]
["\t\t"]
["\t\tvar x4 = centerX + radiusInner * Math.cos(angleEnd);"]
["\t\tvar y4 = centerY + radiusInner * Math.sin(angleEnd);"]
["\t\t"]
["\t\tvar dArray ="]
["\t\t["]
["\t\t\t\" M \", x1, \",\", y1,"]
["\t\t\t\" L \", x2, \",\", y2,"]
["\t\t\t\" A \", gRadius, \",\", gRadius, \" 0 \", longArc, \",1 \", x3, \",\", y3,"]
["\t\t\t\" L \", x4, \",\", y4,"]
["\t\t\t\" A \", radiusInner, \",\", radiusInner, \" 0 \", longArc, \" 0 \", x1, \",\", y1,"]
["\t\t\t\" Z \""]
["\t\t];"]
["\t\t"]
["\t\tsvg +="]
["\t\t\t'<path class=\"'+ (highlight ? 'highlight' : 'wedge') + '\" fill=\"' + color +"]
["\t\t\t'\" d=\"' + dArray.join('') + '\"/>';"]
["\t\t"]
["\t\tif ( patternAlpha > 0 )"]
["\t\t{"]
["\t\t\tsvg +="]
["\t\t\t\t'<path class=\"wedge\" fill=\"url(#hiddenPattern)\" d=\"' +"]
["\t\t\t\tdArray.join('') + '\"/>';"]
["\t\t}"]
["\t}"]
["\telse"]
["\t{"]
["\t\t// fudge to prevent seams during animation"]
["\t\t//"]
["\t\tangleEnd += 1 / gRadius;"]
["\t\t"]
["\t\tcontext.fillStyle = color;"]
["\t\tcontext.beginPath();"]
["\t\tcontext.arc(0, 0, radiusInner, angleStart, angleEnd, false);"]
["\t\tcontext.arc(0, 0, radiusOuter, angleEnd, angleStart, true);"]
["\t\tcontext.closePath();"]
["\t\tcontext.fill();"]
["\t\t"]
["\t\tif ( patternAlpha > 0 )"]
["\t\t{"]
["\t\t\tcontext.save();"]
["\t\t\tcontext.clip();"]
["\t\t\tcontext.globalAlpha = patternAlpha;"]
["\t\t\tcontext.fillStyle = hiddenPattern;"]
["\t\t\tcontext.fill();"]
["\t\t\tcontext.restore();"]
["\t\t}"]
["\t\t"]
["\t\tif ( highlight )"]
["\t\t{"]
["\t\t\tcontext.lineWidth = highlight ? highlightLineWidth : thinLineWidth;"]
["\t\t\tcontext.strokeStyle = 'black';"]
["\t\t\tcontext.stroke();"]
["\t\t}"]
["\t}"]
["}"]
[]
["function expand(node)"]
["{"]
["\tselectNode(node);"]
["\tupdateView();"]
["}"]
[]
["function focusLost()"]
["{"]
["\tmouseX = -1;"]
["\tmouseY = -1;"]
["\tcheckHighlight();"]
["\tdocument.body.style.cursor = 'auto';"]
["}"]
[]
["function fontSizeDecrease()"]
["{"]
["\tif ( fontSize > 1 )"]
["\t{"]
["\t\tfontSize--;"]
["\t\tupdateViewNeeded = true;"]
["\t}"]
["}"]
[]
["function fontSizeIncrease()"]
["{"]
["\tfontSize++;"]
["\tupdateViewNeeded = true;"]
["}"]
[]
["function getGetString(name, value, bool)"]
["{"]
["\treturn name + '=' + (bool ? value ? 'true' : 'false' : value);"]
["}"]
[]
["function hideLink()"]
["{"]
["\thide(linkText);"]
["\tshow(linkButton);"]
["}"]
[]
["function show(object)"]
["{"]
["\tobject.style.display = 'inline';"]
["}"]
[]
["function hide(object)"]
["{"]
["\tobject.style.display = 'none';"]
["}"]
[]
["function showLink()"]
["{"]
["\tvar urlHalves = String(document.location).split('?');"]
["\tvar newGetVariables = new Array();"]
["\t"]
["\tnewGetVariables.push"]
["\t("]
["\t\tgetGetString('dataset', currentDataset, false),"]
["\t\tgetGetString('node', selectedNode.id, false),"]
["\t\tgetGetString('collapse', collapse, true),"]
["\t\tgetGetString('color', useHue(), true),"]
["\t\tgetGetString('depth', maxAbsoluteDepth - 1, false),"]
["\t\tgetGetString('font', fontSize, false),"]
["\t\tgetGetString('key', showKeys, true)"]
["\t);"]
["\t"]
["\thide(linkButton);"]
["\tshow(linkText);"]
["\tlinkText.value = urlHalves[0] + '?' + getVariables.concat(newGetVariables).join('&');"]
["\t//linkText.disabled = false;"]
["\tlinkText.focus();"]
["\tlinkText.select();"]
["\t//linkText.disabled = true;"]
["//\tdocument.location = urlHalves[0] + '?' + getVariables.join('&');"]
["}"]
[]
["function getFirstChild(element)"]
["{"]
["\telement = element.firstChild;"]
["\t"]
["\tif ( element && element.nodeType != 1 )"]
["\t{"]
["\t\telement = getNextSibling(element);"]
["\t}"]
["\t"]
["\treturn element;"]
["}"]
[]
["function getNextSibling(element)"]
["{"]
["\tdo"]
["\t{"]
["\t\telement = element.nextSibling;"]
["\t}"]
["\twhile ( element && element.nodeType != 1 );"]
["\t"]
["\treturn element;"]
["}"]
[]
["function getPercentage(fraction)"]
["{"]
["\treturn round(fraction * 100);"]
["}"]
[]
["function hslText(hue)"]
["{"]
["\tif ( 1 || snapshotMode )"]
["\t{"]
["\t\t// Safari doesn't seem to allow hsl() in SVG"]
["\t\t"]
["\t\tvar rgb = hslToRgb(hue, saturation, (lightnessBase + lightnessMax) / 2);"]
["\t\t"]
["\t\treturn rgbText(rgb.r, rgb.g, rgb.b);"]
["\t}"]
["\telse"]
["\t{"]
["\t\tvar hslArray ="]
["\t\t["]
["\t\t\t'hsl(',"]
["\t\t\tMath.floor(hue * 360),"]
["\t\t\t',',"]
["\t\t\tMath.floor(saturation * 100),"]
["\t\t\t'%,',"]
["\t\t\tMath.floor((lightnessBase + lightnessMax) * 50),"]
["\t\t\t'%)'"]
["\t\t];"]
["\t\t"]
["\t\treturn hslArray.join('');"]
["\t}"]
["}"]
[]
["function hslToRgb(h, s, l)"]
["{"]
["\tvar m1, m2;"]
["\tvar r, g, b;"]
["\t"]
["\tif (s == 0)"]
["\t{"]
["\t\tr = g = b = Math.floor((l * 255));"]
["\t}"]
["\telse"]
["\t{"]
["\t\tif (l <= 0.5)"]
["\t\t{"]
["\t\t\tm2 = l * (s + 1);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tm2 = l + s - l * s;"]
["\t\t}"]
["\t\t"]
["\t\tm1 = l * 2 - m2;"]
["\t\t"]
["\t\tr = Math.floor(hueToRgb(m1, m2, h + 1 / 3));"]
["\t\tg = Math.floor(hueToRgb(m1, m2, h));"]
["\t\tb = Math.floor(hueToRgb(m1, m2, h - 1/3));"]
["\t}"]
["\t"]
["\treturn {r: r, g: g, b: b};"]
["}"]
[]
["function hueToRgb(m1, m2, hue)"]
["{"]
["\tvar v;"]
["\t"]
["\twhile (hue < 0)"]
["\t{"]
["\t\thue += 1;"]
["\t}"]
["\t"]
["\twhile (hue > 1)"]
["\t{"]
["\t\thue -= 1;"]
["\t}"]
["\t"]
["\tif (6 * hue < 1)"]
["\t\tv = m1 + (m2 - m1) * hue * 6;"]
["\telse if (2 * hue < 1)"]
["\t\tv = m2;"]
["\telse if (3 * hue < 2)"]
["\t\tv = m1 + (m2 - m1) * (2/3 - hue) * 6;"]
["\telse"]
["\t\tv = m1;"]
[]
["\treturn 255 * v;"]
["}"]
[]
["function interpolateHue(hueStart, hueEnd, valueStart, valueEnd)"]
["{"]
["\t// since the gradient will be RGB based, we need to add stops to hit all the"]
["\t// colors in the hue spectrum"]
["\t"]
["\thueStopPositions = new Array();"]
["\thueStopHsl = new Array();"]
["\thueStopText = new Array();"]
["\t"]
["\thueStopPositions.push(0);"]
["\thueStopHsl.push(hslText(hueStart));"]
["\thueStopText.push(round(valueStart));"]
["\t"]
["\tfor"]
["\t("]
["\t\tvar i = (hueStart > hueEnd ? 5 / 6 : 1 / 6);"]
["\t\t(hueStart > hueEnd ? i > 0 : i < 1);"]
["\t\ti += (hueStart > hueEnd ? -1 : 1) / 6"]
["\t)"]
["\t{"]
["\t\tif"]
["\t\t("]
["\t\t\thueStart > hueEnd ?"]
["\t\t\t\ti > hueEnd && i < hueStart :"]
["\t\t\t\ti > hueStart && i < hueEnd"]
["\t\t)"]
["\t\t{"]
["\t\t\thueStopPositions.push(lerp(i, hueStart, hueEnd, 0, 1));"]
["\t\t\thueStopHsl.push(hslText(i));"]
["\t\t\thueStopText.push(round(lerp"]
["\t\t\t("]
["\t\t\t\ti,"]
["\t\t\t\thueStart,"]
["\t\t\t\thueEnd,"]
["\t\t\t\tvalueStart,"]
["\t\t\t\tvalueEnd"]
["\t\t\t)));"]
["\t\t}"]
["\t}"]
["\t"]
["\thueStopPositions.push(1);"]
["\thueStopHsl.push(hslText(hueEnd));"]
["\thueStopText.push(round(valueEnd));"]
["}"]
[]
["function keyLineAngle(angle, keyAngle, bendRadius, keyX, keyY, pointsX, pointsY)"]
["{"]
["\tif ( angle < Math.PI / 2 && keyY < bendRadius * Math.sin(angle) "]
["\t|| angle > Math.PI / 2 && keyY < bendRadius)"]
["\t{"]
["\t\treturn Math.asin(keyY / bendRadius);"]
["\t}"]
["\telse"]
["\t{"]
["\t\t// find the angle of the normal to a tangent line that goes to"]
["\t\t// the label"]
["\t\t"]
["\t\tvar textDist = Math.sqrt"]
["\t\t("]
["\t\t\tMath.pow(keyX, 2) +"]
["\t\t\tMath.pow(keyY, 2)"]
["\t\t);"]
["\t\t"]
["\t\tvar tanAngle = Math.acos(bendRadius / textDist) + keyAngle;"]
["\t\t"]
["\t\tif ( angle < tanAngle || angle < Math.PI / 2 )//|| labelLeft < centerX )"]
["\t\t{"]
["\t\t\t// angle doesn't reach far enough for tangent; collapse and"]
["\t\t\t// connect directly to label"]
["\t\t\t"]
["\t\t\tif ( keyY / Math.tan(angle) > 0 )"]
["\t\t\t{"]
["\t\t\t\tpointsX.push(keyY / Math.tan(angle));"]
["\t\t\t\tpointsY.push(keyY);"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tpointsX.push(bendRadius * Math.cos(angle));"]
["\t\t\t\tpointsY.push(bendRadius * Math.sin(angle));"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\treturn angle;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\treturn tanAngle;"]
["\t\t}"]
["\t}"]
["}"]
[]
["function keyOffset()"]
["{"]
["\treturn imageHeight - (keys - currentKey + 1) * (keySize + keyBuffer) + keyBuffer - margin;"]
["}"]
[]
["function lerp(value, fromStart, fromEnd, toStart, toEnd)"]
["{"]
["\treturn (value - fromStart) *"]
["\t\t(toEnd - toStart) /"]
["\t\t(fromEnd - fromStart) +"]
["\t\ttoStart;"]
["}"]
[]
["function createCanvas()"]
["{"]
["\tcanvas = document.createElement('canvas');"]
["\tdocument.body.appendChild(canvas);"]
["\tcontext = canvas.getContext('2d');"]
["}"]
[]
["function load()"]
["{"]
["\tdocument.body.style.overflow = \"hidden\";"]
["\tdocument.body.style.margin = 0;"]
["\t"]
["\tcreateCanvas();"]
["\t"]
["\tif ( context == undefined )"]
["\t{"]
["\t\tdocument.body.innerHTML = '\\"]
["<br/>This browser does not support HTML5 (see \\"]
["<a href=\"https://github.com/marbl/Krona/wiki/Browser%20support\">Browser support</a>).\\"]
["\t';"]
["\t\treturn;"]
["\t}"]
[]
["\tif ( typeof context.fillText != 'function' )"]
["\t{"]
["\t\tdocument.body.innerHTML = '\\"]
["<br/>This browser does not support HTML5 canvas text (see \\"]
["<a href=\"https://github.com/marbl/Krona/wiki/Browser%20support\">Browser support</a>).\\"]
["\t';"]
["\t\treturn;"]
["\t}"]
["\t"]
["\tresize();"]
["\t"]
["\tvar kronaElement = document.getElementsByTagName('krona')[0];"]
["\t"]
["\tvar magnitudeName;"]
["\tvar hueName;"]
["\tvar hueDefault;"]
["\tvar hueStart;"]
["\tvar hueEnd;"]
["\tvar valueStart;"]
["\tvar valueEnd;"]
["\t"]
["\tif ( kronaElement.getAttribute('collapse') != undefined )"]
["\t{"]
["\t\tcollapse = kronaElement.getAttribute('collapse') == 'true';"]
["\t}"]
["\t"]
["\tif ( kronaElement.getAttribute('key') != undefined )"]
["\t{"]
["\t\tshowKeys = kronaElement.getAttribute('key') == 'true';"]
["\t}"]
["\t"]
["\tfor"]
["\t("]
["\t\tvar element = getFirstChild(kronaElement);"]
["\t\telement;"]
["\t\telement = getNextSibling(element)"]
["\t)"]
["\t{"]
["\t\tswitch ( element.tagName.toLowerCase() )"]
["\t\t{"]
["\t\t\tcase 'attributes':"]
["\t\t\t\tmagnitudeName = element.getAttribute('magnitude');"]
["\t\t\t\t//"]
["\t\t\t\tfor"]
["\t\t\t\t("]
["\t\t\t\t\tvar attributeElement = getFirstChild(element);"]
["\t\t\t\t\tattributeElement;"]
["\t\t\t\t\tattributeElement = getNextSibling(attributeElement)"]
["\t\t\t\t)"]
["\t\t\t\t{"]
["\t\t\t\t\tvar tag = attributeElement.tagName.toLowerCase();"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( tag == 'attribute' )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tvar attribute = new Attribute();"]
["\t\t\t\t\t\tattribute.name = attributeElement.firstChild.nodeValue.toLowerCase();"]
["\t\t\t\t\t\tattribute.displayName = attributeElement.getAttribute('display');"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( attributeElement.getAttribute('hrefBase') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.hrefBase = attributeElement.getAttribute('hrefBase');"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( attributeElement.getAttribute('target') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.target = attributeElement.getAttribute('target');"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( attribute.name == magnitudeName )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tmagnitudeIndex = attributes.length;"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( attributeElement.getAttribute('listAll') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.listAll = attributeElement.getAttribute('listAll').toLowerCase();"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\telse if ( attributeElement.getAttribute('listNode') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.listNode = attributeElement.getAttribute('listNode').toLowerCase();"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\telse if ( attributeElement.getAttribute('dataAll') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.dataAll = attributeElement.getAttribute('dataAll').toLowerCase();"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\telse if ( attributeElement.getAttribute('dataNode') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.dataNode = attributeElement.getAttribute('dataNode').toLowerCase();"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( attributeElement.getAttribute('postUrl') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.postUrl = attributeElement.getAttribute('postUrl');"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( attributeElement.getAttribute('postVar') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.postVar = attributeElement.getAttribute('postVar');"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( attributeElement.getAttribute('mono') )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\tattribute.mono = true;"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tattributes.push(attribute);"]
["\t\t\t\t\t}"]
["\t\t\t\t\telse if ( tag == 'list' )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tvar attribute = new Attribute();"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tattribute.name = attributeElement.firstChild.nodeValue;"]
["\t\t\t\t\t\tattribute.list = true;"]
["\t\t\t\t\t\tattributes.push(attribute);"]
["\t\t\t\t\t}"]
["\t\t\t\t\telse if ( tag == 'data' )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tvar attribute = new Attribute();"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tattribute.name = attributeElement.firstChild.nodeValue;"]
["\t\t\t\t\t\tattribute.data = true;"]
["\t\t\t\t\t\tattributes.push(attribute);"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tvar enableScript = document.createElement('script');"]
["\t\t\t\t\t\tvar date = new Date();"]
["\t\t\t\t\t\tenableScript.src ="]
["\t\t\t\t\t\t\tattributeElement.getAttribute('enable') + '?' +"]
["\t\t\t\t\t\t\tdate.getTime();"]
["\t\t\t\t\t\tdocument.body.appendChild(enableScript);"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t\tbreak;"]
["\t\t\t"]
["\t\t\tcase 'color':"]
["\t\t\t\thueName = element.getAttribute('attribute');"]
["\t\t\t\thueStart = Number(element.getAttribute('hueStart')) / 360;"]
["\t\t\t\thueEnd = Number(element.getAttribute('hueEnd')) / 360;"]
["\t\t\t\tvalueStart = Number(element.getAttribute('valueStart'));"]
["\t\t\t\tvalueEnd = Number(element.getAttribute('valueEnd'));"]
["\t\t\t\t//"]
["\t\t\t\tinterpolateHue(hueStart, hueEnd, valueStart, valueEnd);"]
["\t\t\t\t//"]
["\t\t\t\tif ( element.getAttribute('default') == 'true' )"]
["\t\t\t\t{"]
["\t\t\t\t\thueDefault = true;"]
["\t\t\t\t}"]
["\t\t\t\tbreak;"]
["\t\t\t"]
["\t\t\tcase 'datasets':"]
["\t\t\t\tdatasetNames = new Array();"]
["\t\t\t\t//"]
["\t\t\t\tfor ( j = getFirstChild(element); j; j = getNextSibling(j) )"]
["\t\t\t\t{"]
["\t\t\t\t\tdatasetNames.push(j.firstChild.nodeValue);"]
["\t\t\t\t}"]
["\t\t\t\tdatasets = datasetNames.length;"]
["\t\t\t\tbreak;"]
["\t\t\t"]
["\t\t\tcase 'node':"]
["\t\t\t\thead = loadTreeDOM"]
["\t\t\t\t("]
["\t\t\t\t\telement,"]
["\t\t\t\t\tmagnitudeName,"]
["\t\t\t\t\thueName,"]
["\t\t\t\t\thueStart,"]
["\t\t\t\t\thueEnd,"]
["\t\t\t\t\tvalueStart,"]
["\t\t\t\t\tvalueEnd"]
["\t\t\t\t);"]
["\t\t\t\tbreak;"]
["\t\t}"]
["\t}"]
["\t"]
["\t// get GET options"]
["\t//"]
["\tvar urlHalves = String(document.location).split('?');"]
["\tvar datasetDefault = 0;"]
["\tvar maxDepthDefault;"]
["\tvar nodeDefault = 0;"]
["\t//"]
["\tif ( urlHalves[1] )"]
["\t{"]
["\t\tvar vars = urlHalves[1].split('&');"]
["\t\t"]
["\t\tfor ( i = 0; i < vars.length; i++ )"]
["\t\t{"]
["\t\t\tvar pair = vars[i].split('=');"]
["\t\t\t"]
["\t\t\tswitch ( pair[0] )"]
["\t\t\t{"]
["\t\t\t\tcase 'collapse':"]
["\t\t\t\t\tcollapse = pair[1] == 'true';"]
["\t\t\t\t\tbreak;"]
["\t\t\t\t"]
["\t\t\t\tcase 'color':"]
["\t\t\t\t\thueDefault = pair[1] == 'true';"]
["\t\t\t\t\tbreak;"]
["\t\t\t\t"]
["\t\t\t\tcase 'dataset':"]
["\t\t\t\t\tdatasetDefault = Number(pair[1]);"]
["\t\t\t\t\tbreak;"]
["\t\t\t\t\t"]
["\t\t\t\tcase 'depth':"]
["\t\t\t\t\tmaxDepthDefault = Number(pair[1]) + 1;"]
["\t\t\t\t\tbreak;"]
["\t\t\t\t"]
["\t\t\t\tcase 'key':"]
["\t\t\t\t\tshowKeys = pair[1] == 'true';"]
["\t\t\t\t\tbreak;"]
["\t\t\t\t"]
["\t\t\t\tcase 'font':"]
["\t\t\t\t\tfontSize = Number(pair[1]);"]
["\t\t\t\t\tbreak;"]
["\t\t\t\t"]
["\t\t\t\tcase 'node':"]
["\t\t\t\t\tnodeDefault = Number(pair[1]);"]
["\t\t\t\t\tbreak;"]
["\t\t\t\t"]
["\t\t\t\tdefault:"]
["\t\t\t\t\tgetVariables.push(pair[0] + '=' + pair[1]);"]
["\t\t\t\t\tbreak;"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\t"]
["\taddOptionElements(hueName, hueDefault);"]
["\tsetCallBacks();"]
["\t"]
["\thead.sort();"]
["\tmaxAbsoluteDepth = 0;"]
["\tselectDataset(datasetDefault);"]
["\t"]
["\tif ( maxDepthDefault && maxDepthDefault < head.maxDepth )"]
["\t{"]
["\t\tmaxAbsoluteDepth = maxDepthDefault;"]
["\t}"]
["\telse"]
["\t{"]
["\t\tmaxAbsoluteDepth = head.maxDepth;"]
["\t}"]
["\t"]
["\tselectNode(nodes[nodeDefault]);"]
["\t"]
["\tsetInterval(update, 20);"]
["\t"]
["\twindow.onresize = handleResize;"]
["\tupdateMaxAbsoluteDepth();"]
["\tupdateViewNeeded = true;"]
["}"]
[]
["function loadTreeDOM"]
["("]
["\tdomNode,"]
["\tmagnitudeName,"]
["\thueName,"]
["\thueStart,"]
["\thueEnd,"]
["\tvalueStart,"]
["\tvalueEnd"]
[")"]
["{"]
["\tvar newNode = new Node();"]
["\t"]
["\tnewNode.name = domNode.getAttribute('name');"]
["\t"]
["\tif ( domNode.getAttribute('href') )"]
["\t{"]
["\t\tnewNode.href = domNode.getAttribute('href');"]
["\t}"]
["\t"]
["\tif ( hueName )"]
["\t{"]
["\t\tnewNode.hues = new Array();"]
["\t}"]
["\t"]
["\tfor ( var i = getFirstChild(domNode); i; i = getNextSibling(i) )"]
["\t{"]
["\t\tswitch ( i.tagName.toLowerCase() )"]
["\t\t{"]
["\t\tcase 'node': "]
["\t\t\tvar newChild = loadTreeDOM"]
["\t\t\t("]
["\t\t\t\ti,"]
["\t\t\t\tmagnitudeName,"]
["\t\t\t\thueName,"]
["\t\t\t\thueStart,"]
["\t\t\t\thueEnd,"]
["\t\t\t\tvalueStart,"]
["\t\t\t\tvalueEnd"]
["\t\t\t);"]
["\t\t\tnewChild.parent = newNode;"]
["\t\t\tnewNode.children.push(newChild);"]
["\t\t\tbreak;"]
["\t\t\t"]
["\t\tdefault:"]
["\t\t\tvar attributeName = i.tagName.toLowerCase();"]
["\t\t\tvar index = attributeIndex(attributeName);"]
["\t\t\t//"]
["\t\t\tnewNode.attributes[index] = new Array();"]
["\t\t\t//"]
["\t\t\tfor ( var j = getFirstChild(i); j; j = getNextSibling(j) )"]
["\t\t\t{"]
["\t\t\t\tif ( attributes[index] == undefined )"]
["\t\t\t\t{"]
["\t\t\t\t\tvar x = 5;"]
["\t\t\t\t}"]
["\t\t\t\tif ( attributes[index].list )"]
["\t\t\t\t{"]
["\t\t\t\t\tnewNode.attributes[index].push(new Array());"]
["\t\t\t\t\t"]
["\t\t\t\t\tfor ( var k = getFirstChild(j); k; k = getNextSibling(k) )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tnewNode.attributes[index][newNode.attributes[index].length - 1].push(k.firstChild.nodeValue);"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t\telse"]
["\t\t\t\t{"]
["\t\t\t\t\tvar value = j.firstChild ? j.firstChild.nodeValue : '';"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( j.getAttribute('href') )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tvar target;"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( attributes[index].target )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\ttarget = ' target=\"' + attributes[index].target + '\"';"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tvalue = '<a href=\"' + attributes[index].hrefBase + j.getAttribute('href') + '\"' + target + '>' + value + '</a>';"]
["\t\t\t\t\t}"]
["\t\t\t\t\t"]
["\t\t\t\t\tnewNode.attributes[index].push(value);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\t//"]
["\t\t\tif ( attributeName == magnitudeName || attributeName == hueName )"]
["\t\t\t{"]
["\t\t\t\tfor ( j = 0; j < datasets; j++ )"]
["\t\t\t\t{"]
["\t\t\t\t\tvar value = newNode.attributes[index][j] == undefined ? 0 : Number(newNode.attributes[index][j]);"]
["\t\t\t\t\t"]
["\t\t\t\t\tnewNode.attributes[index][j] = value;"]
["\t\t\t\t\t"]
["\t\t\t\t\tif ( attributeName == hueName )"]
["\t\t\t\t\t{"]
["\t\t\t\t\t\tvar hue = lerp"]
["\t\t\t\t\t\t("]
["\t\t\t\t\t\t\tvalue,"]
["\t\t\t\t\t\t\tvalueStart,"]
["\t\t\t\t\t\t\tvalueEnd,"]
["\t\t\t\t\t\t\thueStart,"]
["\t\t\t\t\t\t\thueEnd"]
["\t\t\t\t\t\t);"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tif ( hue < hueStart == hueStart < hueEnd )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\thue = hueStart;"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\telse if ( hue > hueEnd == hueStart < hueEnd )"]
["\t\t\t\t\t\t{"]
["\t\t\t\t\t\t\thue = hueEnd;"]
["\t\t\t\t\t\t}"]
["\t\t\t\t\t\t"]
["\t\t\t\t\t\tnewNode.hues[j] = hue;"]
["\t\t\t\t\t}"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\tif ( attributeName == hueName )"]
["\t\t\t\t{"]
["\t\t\t\t\tnewNode.hue = new Tween(newNode.hues[0], newNode.hues[0]);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t\tbreak;"]
["\t\t}"]
["\t}"]
["\t"]
["\treturn newNode;"]
["}"]
[]
["function maxAbsoluteDepthDecrease()"]
["{"]
["\tif ( maxAbsoluteDepth > 2 )"]
["\t{"]
["\t\tmaxAbsoluteDepth--;"]
["\t\thead.setMaxDepths();"]
["\t\thandleResize();"]
["\t}"]
["}"]
[]
["function maxAbsoluteDepthIncrease()"]
["{"]
["\tif ( maxAbsoluteDepth < head.maxDepth )"]
["\t{"]
["\t\tmaxAbsoluteDepth++;"]
["\t\thead.setMaxDepths();"]
["\t\thandleResize();"]
["\t}"]
["}"]
[]
["function measureText(text, bold)"]
["{"]
["\tcontext.font = bold ? fontBold : fontNormal;"]
["\tvar dim = context.measureText(text);"]
["\treturn dim.width;"]
["}"]
[]
["function min(a, b)"]
["{"]
["\treturn a < b ? a : b;"]
["}"]
[]
["function minWidth()"]
["{"]
["\t// Min wedge width (at center) for displaying a node (or for displaying a"]
["\t// label if it's at the highest level being viewed, multiplied by 2 to make"]
["\t// further calculations simpler"]
["\t"]
["\treturn (fontSize * 2.3);"]
["}"]
[]
["function mouseMove(e)"]
["{"]
["\tmouseX = e.pageX;"]
["\tmouseY = e.pageY - headerHeight;"]
["\tmouseXRel = (mouseX - centerX) * backingScale()"]
["\tmouseYRel = (mouseY - centerY) * backingScale()"]
["\t"]
["\tif ( head && ! quickLook )"]
["\t{"]
["\t\tcheckHighlight();"]
["\t}"]
["}"]
[]
["function mouseClick(e)"]
["{"]
["\tif ( highlightedNode == focusNode && focusNode != selectedNode || selectedNode.hasParent(highlightedNode) )"]
["\t{"]
["\t\tif ( highlightedNode.hasChildren() )"]
["\t\t{"]
["\t\t\texpand(highlightedNode);"]
["\t\t}"]
["\t}"]
["\telse if ( progress == 1 )//( highlightedNode != selectedNode )"]
["\t{"]
["\t\tsetFocus(highlightedNode);"]
["//\t\tdocument.body.style.cursor='ew-resize';"]
["\t\tdraw();"]
["\t\tcheckHighlight();"]
["\t\tvar date = new Date();"]
["\t\tmouseDownTime = date.getTime();"]
["\t\tmouseDown = true;"]
["\t}"]
["}"]
[]
["function mouseUp(e)"]
["{"]
["\tif ( quickLook )"]
["\t{"]
["\t\tnavigateBack();"]
["\t\tquickLook = false;"]
["\t}"]
["\t"]
["\tmouseDown = false;"]
["}"]
[]
["function navigateBack()"]
["{"]
["\tif ( nodeHistoryPosition > 0 )"]
["\t{"]
["\t\tnodeHistory[nodeHistoryPosition] = selectedNode;"]
["\t\tnodeHistoryPosition--;"]
["\t\t"]
["\t\tif ( nodeHistory[nodeHistoryPosition].collapse )"]
["\t\t{"]
["\t\t\tcollapseCheckBox.checked = collapse = false;"]
["\t\t}"]
["\t\t"]
["\t\tsetSelectedNode(nodeHistory[nodeHistoryPosition]);"]
["\t\tupdateDatasetButtons();"]
["\t\tupdateView();"]
["\t}"]
["}"]
[]
["function navigateUp()"]
["{"]
["\tif ( selectedNode.getParent() )"]
["\t{"]
["\t\tselectNode(selectedNode.getParent());"]
["\t\tupdateView();"]
["\t}"]
["}"]
[]
["function navigateForward()"]
["{"]
["\tif ( nodeHistoryPosition < nodeHistory.length - 1 )"]
["\t{"]
["\t\tnodeHistoryPosition++;"]
["\t\tvar newNode = nodeHistory[nodeHistoryPosition];"]
["\t\t"]
["\t\tif ( newNode.collapse )"]
["\t\t{"]
["\t\t\tcollapseCheckBox.checked = collapse = false;"]
["\t\t}"]
["\t\t"]
["\t\tif ( nodeHistoryPosition == nodeHistory.length - 1 )"]
["\t\t{"]
["\t\t\t// this will ensure the forward button is disabled"]
["\t\t\t"]
["\t\t\tnodeHistory.length = nodeHistoryPosition;"]
["\t\t}"]
["\t\t"]
["\t\tsetSelectedNode(newNode);"]
["\t\tupdateDatasetButtons();"]
["\t\tupdateView();"]
["\t}"]
["}"]
[]
["function nextDataset()"]
["{"]
["\tvar newDataset = currentDataset;"]
["\t"]
["\tdo"]
["\t{"]
["\t\tif ( newDataset == datasets - 1 )"]
["\t\t{"]
["\t\t\tnewDataset = 0;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tnewDataset++;"]
["\t\t}"]
["\t}"]
["\twhile ( datasetDropDown.options[newDataset].disabled )"]
["\t"]
["\tselectDataset(newDataset);"]
["}"]
[]
["function onDatasetChange()"]
["{"]
["\tselectDataset(datasetDropDown.selectedIndex);"]
["}"]
[]
["function onKeyDown(event)"]
["{"]
["\tif"]
["\t("]
["\t\tevent.keyCode == 37 &&"]
["\t\tdocument.activeElement.id != 'search' &&"]
["\t\tdocument.activeElement.id != 'linkText'"]
["\t)"]
["\t{"]
["\t\tnavigateBack();"]
["\t\tevent.preventDefault();"]
["\t}"]
["\telse if"]
["\t("]
["\t\tevent.keyCode == 39 &&"]
["\t\tdocument.activeElement.id != 'search' &&"]
["\t\tdocument.activeElement.id != 'linkText'"]
["\t)"]
["\t{"]
["\t\tnavigateForward();"]
["\t\tevent.preventDefault();"]
["\t}"]
["\telse if ( event.keyCode == 38 && datasets > 1 )"]
["\t{"]
["\t\tprevDataset();"]
["\t\t"]
["\t\t//if ( document.activeElement.id == 'datasets' )"]
["\t\t{"]
["\t\t\tevent.preventDefault();"]
["\t\t}"]
["\t}"]
["\telse if ( event.keyCode == 40 && datasets > 1 )"]
["\t{"]
["\t\tnextDataset();"]
["\t\t"]
["\t\t//if ( document.activeElement.id == 'datasets' )"]
["\t\t{"]
["\t\t\tevent.preventDefault();"]
["\t\t}"]
["\t}"]
["\telse if ( event.keyCode == 9 && datasets > 1 )"]
["\t{"]
["\t\tselectLastDataset();"]
["\t\tevent.preventDefault();"]
["\t}"]
["\telse if ( event.keyCode == 83 )"]
["\t{"]
["\t\tprogress += .2;"]
["\t}"]
["\telse if ( event.keyCode == 66 )"]
["\t{"]
["\t\tprogress -= .2;"]
["\t}"]
["\telse if ( event.keyCode == 70 )"]
["\t{"]
["\t\tprogress = 1;"]
["\t}"]
["}"]
[]
["function onKeyPress(event)"]
["{"]
["\tif ( event.keyCode == 38 && datasets > 1 )"]
["\t{"]
["//\t\tprevDataset();"]
["\t\t"]
["\t\t//if ( document.activeElement.id == 'datasets' )"]
["\t\t{"]
["\t\t\tevent.preventDefault();"]
["\t\t}"]
["\t}"]
["\telse if ( event.keyCode == 40 && datasets > 1 )"]
["\t{"]
["//\t\tnextDataset();"]
["\t\t"]
["\t\t//if ( document.activeElement.id == 'datasets' )"]
["\t\t{"]
["\t\t\tevent.preventDefault();"]
["\t\t}"]
["\t}"]
["}"]
[]
["function onKeyUp(event)"]
["{"]
["\tif ( event.keyCode == 27 && document.activeElement.id == 'search' )"]
["\t{"]
["\t\tsearch.value = '';"]
["\t\tonSearchChange();"]
["\t}"]
["\telse if ( event.keyCode == 38 && datasets > 1 )"]
["\t{"]
["//\t\tprevDataset();"]
["\t\t"]
["\t\t//if ( document.activeElement.id == 'datasets' )"]
["\t\t{"]
["\t\t\tevent.preventDefault();"]
["\t\t}"]
["\t}"]
["\telse if ( event.keyCode == 40 && datasets > 1 )"]
["\t{"]
["//\t\tnextDataset();"]
["\t\t"]
["\t\t//if ( document.activeElement.id == 'datasets' )"]
["\t\t{"]
["\t\t\tevent.preventDefault();"]
["\t\t}"]
["\t}"]
["}"]
[]
["function onSearchChange()"]
["{"]
["\tnSearchResults = 0;"]
["\thead.search();"]
["\t"]
["\tif ( search.value == '' )"]
["\t{"]
["\t\tsearchResults.innerHTML = '';"]
["\t}"]
["\telse"]
["\t{"]
["\t\tsearchResults.innerHTML = nSearchResults + ' results';"]
["\t}"]
["\t"]
["\tsetFocus(selectedNode);"]
["\tdraw();"]
["}"]
[]
["function post(url, variable, value, postWindow)"]
["{"]
["\tvar form = document.createElement('form');"]
["\tvar input = document.createElement('input');"]
["\tvar inputDataset = document.createElement('input');"]
["\t"]
["\tform.appendChild(input);"]
["\tform.appendChild(inputDataset);"]
["\t"]
["\tform.method = \"POST\";"]
["\tform.action = url;"]
["\t"]
["\tif ( postWindow == undefined )"]
["\t{"]
["\t\tform.target = '_blank';"]
["\t\tpostWindow = window;"]
["\t}"]
["\t"]
["\tinput.type = 'hidden';"]
["\tinput.name = variable;"]
["\tinput.value = value;"]
["\t"]
["\tinputDataset.type = 'hidden';"]
["\tinputDataset.name = 'dataset';"]
["\tinputDataset.value = currentDataset;"]
["\t"]
["\tpostWindow.document.body.appendChild(form);"]
["\tform.submit();"]
["}"]
[]
["function prevDataset()"]
["{"]
["\tvar newDataset = currentDataset;"]
["\t"]
["\tdo"]
["\t{"]
["\t\tif ( newDataset == 0 )"]
["\t\t{"]
["\t\t\tnewDataset = datasets - 1;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tnewDataset--;"]
["\t\t}"]
["\t}"]
["\twhile ( datasetDropDown.options[newDataset].disabled );"]
["\t"]
["\tselectDataset(newDataset);"]
["}"]
[]
["function radiusDecrease()"]
["{"]
["\tif ( bufferFactor < .309 )"]
["\t{"]
["\t\tbufferFactor += .03;"]
["\t\tupdateViewNeeded = true;"]
["\t}"]
["}"]
[]
["function radiusIncrease()"]
["{"]
["\tif ( bufferFactor > .041 )"]
["\t{"]
["\t\tbufferFactor -= .03;"]
["\t\tupdateViewNeeded = true;"]
["\t}"]
["}"]
[]
["function resetKeyOffset()"]
["{"]
["\tcurrentKey = 1;"]
["\tkeyMinTextLeft = centerX + gRadius + buffer - buffer / (keys + 1) / 2 + fontSize / 2;"]
["\tkeyMinAngle = 0;"]
["}"]
[]
["function rgbText(r, g, b)"]
["{"]
["\tvar rgbArray ="]
["\t["]
["\t\t\"rgb(\","]
["\t\tMath.floor(r),"]
["\t\t\",\","]
["\t\tMath.floor(g),"]
["\t\t\",\","]
["\t\tMath.floor(b),"]
["\t\t\")\""]
["\t];"]
["\t"]
["\treturn rgbArray.join('');"]
["}"]
[]
["function round(number)"]
["{"]
["\tif ( number >= 1 || number <= -1 )"]
["\t{"]
["\t\treturn number.toFixed(0);"]
["\t}"]
["\telse"]
["\t{"]
["\t\treturn number.toPrecision(1);"]
["\t}"]
["}"]
[]
["function roundedRectangle(x, y, width, height, radius)"]
["{"]
["\tif ( radius * 2 > width )"]
["\t{"]
["\t\tradius = width / 2;"]
["\t}"]
["\t"]
["\tif ( radius * 2 > height )"]
["\t{"]
["\t\tradius = height / 2;"]
["\t}"]
["\t"]
["\tcontext.beginPath();"]
["\tcontext.arc(x + radius, y + radius, radius, Math.PI, Math.PI * 3 / 2, false);"]
["\tcontext.lineTo(x + width - radius, y);"]
["\tcontext.arc(x + width - radius, y + radius, radius, Math.PI * 3 / 2, Math.PI * 2, false);"]
["\tcontext.lineTo(x + width, y + height - radius);"]
["\tcontext.arc(x + width - radius, y + height - radius, radius, 0, Math.PI / 2, false);"]
["\tcontext.lineTo(x + radius, y + height);"]
["\tcontext.arc(x + radius, y + height - radius, radius, Math.PI / 2, Math.PI, false);"]
["\tcontext.lineTo(x, y + radius);"]
["}"]
[]
["function passClick(e)"]
["{"]
["\tmouseClick(e);"]
["}"]
[]
["function searchResultString(results)"]
["{"]
["\tvar searchResults = this.searchResults;"]
["\t"]
["\tif ( this.isSearchResult )"]
["\t{"]
["\t\t// don't count ourselves"]
["\t\tsearchResults--;"]
["\t}"]
["\t"]
["\treturn ' - ' + results + (results > 1 ? ' results' : ' result');"]
["}"]
[]
["function setCallBacks()"]
["{"]
["\tcanvas.onselectstart = function(){return false;} // prevent unwanted highlighting"]
["\toptions.onselectstart = function(){return false;} // prevent unwanted highlighting"]
["\tdocument.onmousemove = mouseMove;"]
["\twindow.onblur = focusLost;"]
["\twindow.onmouseout = focusLost;"]
["\tdocument.onkeyup = onKeyUp;"]
["\tdocument.onkeydown = onKeyDown;"]
["\tcanvas.onmousedown = mouseClick;"]
["\tdocument.onmouseup = mouseUp;"]
["\tkeyControl.onclick = toggleKeys;"]
["\tcollapseCheckBox = document.getElementById('collapse');"]
["\tcollapseCheckBox.checked = collapse;"]
["\tcollapseCheckBox.onclick = handleResize;"]
["\tcollapseCheckBox.onmousedown = suppressEvent;"]
["\tmaxAbsoluteDepthText = document.getElementById('maxAbsoluteDepth');"]
["\tmaxAbsoluteDepthButtonDecrease = document.getElementById('maxAbsoluteDepthDecrease');"]
["\tmaxAbsoluteDepthButtonIncrease = document.getElementById('maxAbsoluteDepthIncrease');"]
["\tmaxAbsoluteDepthButtonDecrease.onclick = maxAbsoluteDepthDecrease;"]
["\tmaxAbsoluteDepthButtonIncrease.onclick = maxAbsoluteDepthIncrease;"]
["\tmaxAbsoluteDepthButtonDecrease.onmousedown = suppressEvent;"]
["\tmaxAbsoluteDepthButtonIncrease.onmousedown = suppressEvent;"]
["\tfontSizeText = document.getElementById('fontSize');"]
["\tfontSizeButtonDecrease = document.getElementById('fontSizeDecrease');"]
["\tfontSizeButtonIncrease = document.getElementById('fontSizeIncrease');"]
["\tfontSizeButtonDecrease.onclick = fontSizeDecrease;"]
["\tfontSizeButtonIncrease.onclick = fontSizeIncrease;"]
["\tfontSizeButtonDecrease.onmousedown = suppressEvent;"]
["\tfontSizeButtonIncrease.onmousedown = suppressEvent;"]
["\tradiusButtonDecrease = document.getElementById('radiusDecrease');"]
["\tradiusButtonIncrease = document.getElementById('radiusIncrease');"]
["\tradiusButtonDecrease.onclick = radiusDecrease;"]
["\tradiusButtonIncrease.onclick = radiusIncrease;"]
["\tradiusButtonDecrease.onmousedown = suppressEvent;"]
["\tradiusButtonIncrease.onmousedown = suppressEvent;"]
["\tmaxAbsoluteDepth = 0;"]
["\tbackButton = document.getElementById('back');"]
["\tbackButton.onclick = navigateBack;"]
["\tbackButton.onmousedown = suppressEvent;"]
["\tforwardButton = document.getElementById('forward');"]
["\tforwardButton.onclick = navigateForward;"]
["\tforwardButton.onmousedown = suppressEvent;"]
["\tsnapshotButton = document.getElementById('snapshot');"]
["\tsnapshotButton.onclick = snapshot;"]
["\tsnapshotButton.onmousedown = suppressEvent;"]
["\tdetailsName = document.getElementById('detailsName');"]
["\tdetailsExpand = document.getElementById('detailsExpand');"]
["\tdetailsInfo = document.getElementById('detailsInfo');"]
["\tsearch = document.getElementById('search');"]
["\tsearch.onkeyup = onSearchChange;"]
["\tsearch.onmousedown = suppressEvent;"]
["\tsearchResults = document.getElementById('searchResults');"]
["\tuseHueDiv = document.getElementById('useHueDiv');"]
["\tlinkButton = document.getElementById('linkButton');"]
["\tlinkButton.onclick = showLink;"]
["\tlinkButton.onmousedown = suppressEvent;"]
["\tlinkText = document.getElementById('linkText');"]
["\tlinkText.onblur = hideLink;"]
["\tlinkText.onmousedown = suppressEvent;"]
["\thide(linkText);"]
["\tvar helpButton = document.getElementById('help');"]
["\thelpButton.onmousedown = suppressEvent;"]
["\tvar searchClear = document.getElementById('searchClear');"]
["\tsearchClear.onmousedown = suppressEvent;"]
["\tif ( datasets > 1 )"]
["\t{"]
["\t\tdatasetDropDown.onmousedown = suppressEvent;"]
["\t\tvar prevDatasetButton = document.getElementById('prevDataset');"]
["\t\tprevDatasetButton.onmousedown = suppressEvent;"]
["\t\tvar nextDatasetButton = document.getElementById('nextDataset');"]
["\t\tnextDatasetButton.onmousedown = suppressEvent;"]
["\t\tvar lastDatasetButton = document.getElementById('lastDataset');"]
["\t\tlastDatasetButton.onmousedown = suppressEvent;"]
["\t}"]
["\t"]
["\timage = document.getElementById('hiddenImage');"]
["\t"]
["\tif ( image.complete )"]
["\t{"]
["\t\thiddenPattern = context.createPattern(image, 'repeat');"]
["\t}"]
["\telse"]
["\t{"]
["\t\timage.onload = function()"]
["\t\t{"]
["\t\t\thiddenPattern = context.createPattern(image, 'repeat');"]
["\t\t}"]
["\t}"]
["\t"]
["\tvar loadingImageElement = document.getElementById('loadingImage');"]
["\t"]
["\tif ( loadingImageElement )"]
["\t{"]
["\t\tloadingImage = loadingImageElement.src;"]
["\t}"]
["}"]
[]
["function selectDataset(newDataset)"]
["{"]
["\tlastDataset = currentDataset;"]
["\tcurrentDataset = newDataset"]
["\tif ( datasets > 1 )"]
["\t{"]
["\t\tdatasetDropDown.selectedIndex = currentDataset;"]
["\t\tupdateDatasetButtons();"]
["\t\tdatasetAlpha.start = 1.5;"]
["\t\tdatasetChanged = true;"]
["\t}"]
["\thead.setMagnitudes(0);"]
["\thead.setDepth(1, 1);"]
["\thead.setMaxDepths();"]
["\thandleResize();"]
["}"]
[]
["function selectLastDataset()"]
["{"]
["\tselectDataset(lastDataset);"]
["\thandleResize();"]
["}"]
[]
["function selectNode(newNode)"]
["{"]
["\tif ( selectedNode != newNode )"]
["\t{"]
["\t\t// truncate history at current location to create a new branch"]
["\t\t//"]
["\t\tnodeHistory.length = nodeHistoryPosition;"]
["\t\t"]
["\t\tif ( selectedNode != 0 )"]
["\t\t{"]
["\t\t\tnodeHistory.push(selectedNode);"]
["\t\t\tnodeHistoryPosition++;"]
["\t\t}"]
["\t\t"]
["\t\tsetSelectedNode(newNode);"]
["\t\t//updateView();"]
["\t}"]
["\t"]
["\tupdateDatasetButtons();"]
["}"]
[]
["function setFocus(node)"]
["{"]
["\tif ( node == focusNode )"]
["\t{"]
["//\t\treturn;"]
["\t}"]
["\t"]
["\tfocusNode = node;"]
["\t"]
["\tif ( node.href )"]
["\t{"]
["\t\tdetailsName.innerHTML ="]
["\t\t\t'<a target=\"_blank\" href=\"' + node.href + '\">' + node.name + '</a>';"]
["\t}"]
["\telse"]
["\t{"]
["\t\tdetailsName.innerHTML = node.name;"]
["\t}"]
["\t"]
["\tvar table = '<table>';"]
["\t"]
["\ttable += '<tr><td></td></tr>';"]
["\t"]
["\tfor ( var i = 0; i < node.attributes.length; i++ )"]
["\t{"]
["\t\tif ( attributes[i].displayName && node.attributes[i] != undefined )"]
["\t\t{"]
["\t\t\tvar index = node.attributes[i].length == 1 && attributes[i].mono ? 0 : currentDataset;"]
["\t\t\t"]
["\t\t\tif ( typeof node.attributes[i][currentDataset] == 'number' || node.attributes[i][index] != undefined && node.attributes[i][currentDataset] != '' )"]
["\t\t\t{"]
["\t\t\t\tvar value = node.attributes[i][index];"]
["\t\t\t\t"]
["\t\t\t\tif ( attributes[i].listNode != undefined )"]
["\t\t\t\t{"]
["\t\t\t\t\tvalue ="]
["\t\t\t\t\t\t'<a href=\"\" onclick=\"showList(' +"]
["\t\t\t\t\t\tattributeIndex(attributes[i].listNode) + ',' + i +"]
["\t\t\t\t\t\t',false);return false;\" title=\"Show list\">' +"]
["\t\t\t\t\t\tvalue + '</a>';"]
["\t\t\t\t}"]
["\t\t\t\telse if ( attributes[i].listAll != undefined )"]
["\t\t\t\t{"]
["\t\t\t\t\tvalue ="]
["\t\t\t\t\t\t'<a href=\"\" onclick=\"showList(' +"]
["\t\t\t\t\t\tattributeIndex(attributes[i].listAll) + ',' + i +"]
["\t\t\t\t\t\t',true);return false;\" title=\"Show list\">' +"]
["\t\t\t\t\t\tvalue + '</a>';"]
["\t\t\t\t}"]
["\t\t\t\telse if ( attributes[i].dataNode != undefined && dataEnabled )"]
["\t\t\t\t{"]
["\t\t\t\t\tvalue ="]
["\t\t\t\t\t\t'<a href=\"\" onclick=\"showData(' +"]
["\t\t\t\t\t\tattributeIndex(attributes[i].dataNode) + ',' + i +"]
["\t\t\t\t\t\t',false);return false;\" title=\"Show data\">' +"]
["\t\t\t\t\t\tvalue + '</a>';"]
["\t\t\t\t}"]
["\t\t\t\telse if ( attributes[i].dataAll != undefined && dataEnabled )"]
["\t\t\t\t{"]
["\t\t\t\t\tvalue ="]
["\t\t\t\t\t\t'<a href=\"\" onclick=\"showData(' +"]
["\t\t\t\t\t\tattributeIndex(attributes[i].dataAll) + ',' + i +"]
["\t\t\t\t\t\t',true);return false;\" title=\"Show data\">' +"]
["\t\t\t\t\t\tvalue + '</a>';"]
["\t\t\t\t}"]
["\t\t\t\t"]
["\t\t\t\ttable +="]
["\t\t\t\t\t'<tr><td><strong>' + attributes[i].displayName + ':</strong></td><td>' +"]
["\t\t\t\t\tvalue + '</td></tr>';"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\t"]
["\ttable += '</table>';"]
["\tdetailsInfo.innerHTML = table;"]
["\t"]
["\tdetailsExpand.disabled = !focusNode.hasChildren() || focusNode == selectedNode;"]
["}"]
[]
["function setSelectedNode(newNode)"]
["{"]
["\tif ( selectedNode && selectedNode.hasParent(newNode) )"]
["\t{"]
["\t\tzoomOut = true;"]
["\t}"]
["\telse"]
["\t{"]
["\t\tzoomOut = false;"]
["\t}"]
["\t"]
["\tselectedNodeLast = selectedNode;"]
["\tselectedNode = newNode;"]
["\t"]
["\t//if ( focusNode != selectedNode )"]
["\t{"]
["\t\tsetFocus(selectedNode);"]
["\t}"]
["}"]
[]
["function waitForData(dataWindow, target, title, time, postUrl, postVar)"]
["{"]
["\tif ( nodeData.length == target )"]
["\t{"]
["\t\tif ( postUrl != undefined )"]
["\t\t{"]
["\t\t\tfor ( var i = 0; i < nodeData.length; i++ )"]
["\t\t\t{"]
["\t\t\t\tnodeData[i] = nodeData[i].replace(/\\n/g, ',');"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\tvar postString = nodeData.join('');"]
["\t\t\tpostString = postString.slice(0, -1);"]
["\t\t\t"]
["\t\t\tdataWindow.document.body.removeChild(dataWindow.document.getElementById('loading'));"]
["\t\t\tdocument.body.removeChild(document.getElementById('data'));"]
["\t\t\t"]
["\t\t\tpost(postUrl, postVar, postString, dataWindow);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\t//dataWindow.document.body.removeChild(dataWindow.document.getElementById('loading'));"]
["\t\t\t//document.body.removeChild(document.getElementById('data'));"]
["\t\t\t"]
["\t\t\tdataWindow.document.open();"]
["\t\t\tdataWindow.document.write('<pre>' + nodeData.join('') + '</pre>');"]
["\t\t\tdataWindow.document.close();"]
["\t\t}"]
["\t\t"]
["\t\tdataWindow.document.title = title; // replace after document.write()"]
["\t}"]
["\telse"]
["\t{"]
["\t\tvar date = new Date();"]
["\t\t"]
["\t\tif ( date.getTime() - time > 10000 )"]
["\t\t{"]
["\t\t\tdataWindow.document.body.removeChild(dataWindow.document.getElementById('loading'));"]
["\t\t\tdocument.body.removeChild(document.getElementById('data'));"]
["\t\t\tdataWindow.document.body.innerHTML ="]
["\t\t\t\t'Timed out loading supplemental files for:<br/>' + document.location;"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tsetTimeout(function() {waitForData(dataWindow, target, title, time, postUrl, postVar);}, 100);"]
["\t\t}"]
["\t}"]
["}"]
[]
["function data(newData)"]
["{"]
["\tnodeData.push(newData);"]
["}"]
[]
["function enableData()"]
["{"]
["\tdataEnabled = true;"]
["}"]
[]
["function showData(indexData, indexAttribute, summary)"]
["{"]
["\tvar dataWindow = window.open('', '_blank');"]
["\tvar title = 'Krona - ' + attributes[indexAttribute].displayName + ' - ' + focusNode.name;"]
["\tdataWindow.document.title = title;"]
["\t"]
["\tnodeData = new Array();"]
["\t"]
["\tif ( dataWindow && dataWindow.document && dataWindow.document.body != null )"]
["\t{"]
["\t\t//var loadImage = document.createElement('img');"]
["\t\t//loadImage.src = \"file://localhost/Users/ondovb/Krona/KronaTools/img/loading.gif\";"]
["\t\t//loadImage.id = \"loading\";"]
["\t\t//loadImage.alt = \"Loading...\";"]
["\t\t//dataWindow.document.body.appendChild(loadImage);"]
["\t\tdataWindow.document.body.innerHTML ="]
["\t\t\t'<img id=\"loading\" src=\"' + loadingImage + '\" alt=\"Loading...\"></img>';"]
["\t}"]
["\t"]
["\tvar scripts = document.createElement('div');"]
["\tscripts.id = 'data';"]
["\tdocument.body.appendChild(scripts);"]
["\t"]
["\tvar files = focusNode.getData(indexData, summary);"]
["\t"]
["\tvar date = new Date();"]
["\tvar time = date.getTime();"]
["\t"]
["\tfor ( var i = 0; i < files.length; i++ )"]
["\t{"]
["\t\tvar script = document.createElement('script');"]
["\t\tscript.src = files[i] + '?' + time;"]
["\t\tscripts.appendChild(script);"]
["\t}"]
["\t"]
["\twaitForData(dataWindow, files.length, title, time, attributes[indexAttribute].postUrl, attributes[indexAttribute].postVar);"]
["\t"]
["\treturn false;"]
["}"]
[]
["function showList(indexList, indexAttribute, summary)"]
["{"]
["\tvar list = focusNode.getList(indexList, summary);"]
["\t"]
["\tif ( attributes[indexAttribute].postUrl != undefined )"]
["\t{"]
["\t\tpost(attributes[indexAttribute].postUrl, attributes[indexAttribute].postVar, list.join(','));"]
["\t}"]
["\telse"]
["\t{"]
["\t\tvar dataWindow = window.open('', '_blank');"]
["\t\t"]
["\t\tif ( true || navigator.appName == 'Microsoft Internet Explorer' ) // :("]
["\t\t{"]
["\t\t\tdataWindow.document.open();"]
["\t\t\tdataWindow.document.write('<pre>' + list.join('\\n') + '</pre>');"]
["\t\t\tdataWindow.document.close();"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tvar pre = document.createElement('pre');"]
["\t\t\tdataWindow.document.body.appendChild(pre);"]
["\t\t\tpre.innerHTML = list;"]
["\t\t}"]
["\t\t"]
["\t\tdataWindow.document.title = 'Krona - ' + attributes[indexAttribute].displayName + ' - ' + focusNode.name;"]
["\t}"]
["}"]
[]
["function snapshot()"]
["{"]
["\tsvg = svgHeader();"]
["\t"]
["\tresetKeyOffset();"]
["\t"]
["\tsnapshotMode = true;"]
["\t"]
["\tselectedNode.draw(false, true);"]
["\tselectedNode.draw(true, true);"]
["\t"]
["\tif ( focusNode != 0 && focusNode != selectedNode )"]
["\t{"]
["\t\tcontext.globalAlpha = 1;"]
["\t\tfocusNode.drawHighlight(true);"]
["\t}"]
["\t"]
["\tif ( hueDisplayName && useHue() )"]
["\t{"]
["\t\tdrawLegendSVG();"]
["\t}"]
["\t"]
["\tsnapshotMode = false;"]
["\t"]
["\tsvg += svgFooter();"]
["\t"]
["\tsnapshotWindow = window.open"]
["\t("]
["\t\t'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg),"]
["\t\t'_blank'"]
["\t);"]
["/*\tvar data = window.open('data:text/plain;charset=utf-8,hello', '_blank');"]
["\tvar data = window.open('', '_blank');"]
["\tdata.document.open('text/plain');"]
["\tdata.document.write('hello');"]
["\tdata.document.close();"]
["\tvar button = document.createElement('input');"]
["\tbutton.type = 'button';"]
["\tbutton.value = 'save';"]
["\tbutton.onclick = save;"]
["\tdata.document.body.appendChild(button);"]
["//\tsnapshotWindow.document.write(svg);"]
["//\tsnapshotWindow.document.close();"]
["*/\t"]
["}"]
[]
["function save()"]
["{"]
["\talert(document.body.innerHTML);"]
["}"]
[]
["function spacer()"]
["{"]
["\tif ( snapshotMode )"]
["\t{"]
["\t\treturn '&#160;&#160;&#160;';"]
["\t}"]
["\telse"]
["\t{"]
["\t\treturn '   ';"]
["\t}"]
["}"]
[]
["function suppressEvent(e)"]
["{"]
["\te.cancelBubble = true;"]
["\tif (e.stopPropagation) e.stopPropagation();"]
["}"]
[]
["function svgFooter()"]
["{"]
["\treturn '</svg>';"]
["}"]
[]
["function svgHeader()"]
["{"]
["\tvar patternWidth = fontSize * .6;//radius / 50;"]
["\t"]
["\treturn '\\"]
["<?xml version=\"1.0\" standalone=\"no\"?>\\"]
["<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \\"]
["\t\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\\"]
["<svg width=\"' + imageWidth + '\" height=\"' + imageHeight + '\" version=\"1.1\"\\"]
["\txmlns=\"http://www.w3.org/2000/svg\">\\"]
["<title>Krona (snapshot) - ' +"]
["(datasets > 1 ? datasetNames[currentDataset] + ' - ' : '') + selectedNode.name +"]
["'</title>\\"]
["<defs>\\"]
["\t<style type=\"text/css\">\\"]
["\ttext {font-size: ' + fontSize + 'px; font-family: ' + fontFamily + '; dominant-baseline:central}\\"]
["\tpath {stroke-width:' + thinLineWidth * fontSize / 12 + ';}\\"]
["\tpath.wedge {stroke:none}\\"]
["\tpath.line {fill:none;stroke:black;}\\"]
["\tline {stroke:black;stroke-width:' + thinLineWidth * fontSize / 12 + ';}\\"]
["\tline.tick {stroke-width:' + thinLineWidth * fontSize / 6 + ';}\\"]
["\tline.pattern {stroke-width:' + thinLineWidth * fontSize / 18 + ';}\\"]
["\tcircle {fill:none;stroke:black;stroke-width:' + thinLineWidth * fontSize / 12 + ';}\\"]
["\trect {stroke:black;stroke-width:' + thinLineWidth * fontSize / 12 + ';}\\"]
["\t.highlight {stroke:black;stroke-width:'+ highlightLineWidth * fontSize / 12 + ';}\\"]
["\t.searchHighlight {fill:rgb(255, 255, 100);stroke:none;}\\"]
["\t</style>\\"]
["<pattern id=\"hiddenPattern\" patternUnits=\"userSpaceOnUse\" \\"]
["x=\"0\" y=\"0\" width=\"' + patternWidth + '\" height=\"' + patternWidth + '\">\\"]
["<line class=\"pattern\" x1=\"0\" y1=\"0\" x2=\"' + patternWidth / 2 + '\" y2=\"' + patternWidth / 2 + '\"/>\\"]
["<line class=\"pattern\" x1=\"' + patternWidth / 2 + '\" y1=\"' + patternWidth +"]
["'\" x2=\"' + patternWidth + '\" y2=\"' + patternWidth / 2 + '\"/>\\"]
["</pattern>\\"]
["</defs>\\"]
["';"]
["}"]
[]
["function svgText(text, x, y, anchor, bold, color)"]
["{"]
["\tif ( typeof(anchor) == 'undefined' )"]
["\t{"]
["\t\tanchor = 'start';"]
["\t}"]
["\t"]
["\tif ( color == undefined )"]
["\t{"]
["\t\tcolor = 'black';"]
["\t}"]
["\t"]
["\treturn '<text x=\"' + x + '\" y=\"' + y +"]
["\t\t'\" style=\"font-color:' + color + ';font-weight:' + (bold ? 'bold' : 'normal') +"]
["\t\t'\" text-anchor=\"' + anchor + '\">' + text + '</text>';"]
["}"]
[]
["function toggleKeys()"]
["{"]
["\tif ( showKeys )"]
["\t{"]
["\t\tkeyControl.value = '...';"]
["\t\tshowKeys = false;"]
["\t}"]
["\telse"]
["\t{"]
["\t\tkeyControl.value = 'x';"]
["\t\tshowKeys = true;"]
["\t}"]
["\t"]
["\tupdateKeyControl();"]
["\t"]
["\tif ( progress == 1 )"]
["\t{"]
["\t\tdraw();"]
["\t}"]
["}"]
[]
["function update()"]
["{"]
["\tif ( ! head )"]
["\t{"]
["\t\treturn;"]
["\t}"]
["\t"]
["\tif ( mouseDown && focusNode != selectedNode )"]
["\t{"]
["\t\tvar date = new Date();"]
["\t\t"]
["\t\tif ( date.getTime() - mouseDownTime > quickLookHoldLength )"]
["\t\t{"]
["\t\t\tif ( focusNode.hasChildren() )"]
["\t\t\t{"]
["\t\t\t\texpand(focusNode);"]
["\t\t\t\tquickLook = true;"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\t"]
["\tif ( updateViewNeeded )"]
["\t{"]
["\t\tresize();"]
["\t\tmouseX = -1;"]
["\t\tmouseY = -1;"]
["\t\t"]
["\t\tcollapse = collapseCheckBox.checked;"]
["\t\tcompress = true;//compressCheckBox.checked;"]
["\t\tshorten = true;//shortenCheckBox.checked;"]
["\t\t"]
["\t\tcheckSelectedCollapse();"]
["\t\tupdateMaxAbsoluteDepth();"]
["\t\t"]
["\t\tif ( focusNode.getCollapse() || focusNode.depth > maxAbsoluteDepth )"]
["\t\t{"]
["\t\t\tsetFocus(selectedNode);"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tsetFocus(focusNode);"]
["\t\t}"]
["\t\t"]
["\t\tupdateView();"]
["\t\t"]
["\t\tupdateViewNeeded = false;"]
["\t}"]
["\t"]
["\tvar date = new Date();"]
["\tprogress = (date.getTime() - tweenStartTime) / tweenLength;"]
["//\tprogress += .01;"]
["\t"]
["\tif ( progress >= 1 )"]
["\t{"]
["\t\tprogress = 1;"]
["\t}"]
["\t"]
["\tif ( progress != progressLast )"]
["\t{"]
["\t\ttweenFactor =// progress;"]
["\t\t\t(1 / (1 + Math.exp(-tweenCurvature * (progress - .5))) - .5) /"]
["\t\t\t(tweenMax - .5) / 2 + .5;"]
["\t\t"]
["\t\tif ( progress == 1 )"]
["\t\t{"]
["\t\t\tsnapshotButton.disabled = false;"]
["\t\t\tzoomOut = false;"]
["\t\t\t"]
["\t\t\t//updateKeyControl();"]
["\t\t\t"]
["\t\t\tif ( ! quickLook )"]
["\t\t\t{"]
["\t\t\t\t//checkHighlight();"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\t"]
["\t\t\tif ( fpsDisplay )"]
["\t\t\t{"]
["\t\t\t\tfpsDisplay.innerHTML = 'fps: ' + Math.round(tweenFrames * 1000 / tweenLength);"]
["\t\t\t}"]
["\t\t}"]
["\t\t"]
["\t\tdraw();"]
["\t}"]
["\t"]
["\tprogressLast = progress;"]
["}"]
[]
["function updateDatasetButtons()"]
["{"]
["\tif ( datasets == 1 )"]
["\t{"]
["\t\treturn;"]
["\t}"]
["\t"]
["\tvar node = selectedNode ? selectedNode : head;"]
["\t"]
["\tdatasetButtonLast.disabled ="]
["\t\tnode.attributes[magnitudeIndex][lastDataset] == 0;"]
["\t"]
["\tdatasetButtonPrev.disabled = true;"]
["\tdatasetButtonNext.disabled = true;"]
["\t"]
["\tfor ( var i = 0; i < datasets; i++ )"]
["\t{"]
["\t\tvar disable = node.attributes[magnitudeIndex][i] == 0;"]
["\t\t"]
["\t\tdatasetDropDown.options[i].disabled = disable;"]
["\t\t"]
["\t\tif ( ! disable )"]
["\t\t{"]
["\t\t\tif ( i != currentDataset )"]
["\t\t\t{"]
["\t\t\t\tdatasetButtonPrev.disabled = false;"]
["\t\t\t\tdatasetButtonNext.disabled = false;"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["}"]
[]
["function updateDatasetWidths()"]
["{"]
["\tif ( datasets > 1 )"]
["\t{"]
["\t\tfor ( var i = 0; i < datasets; i++ )"]
["\t\t{"]
["\t\t\tcontext.font = fontBold;"]
["\t\t\tvar dim = context.measureText(datasetNames[i]);"]
["\t\t\tdatasetWidths[i] = dim.width;"]
["\t\t}"]
["\t}"]
["}"]
[]
["function updateKeyControl()"]
["{"]
["\tif ( keys == 0 )//|| progress != 1 )"]
["\t{"]
["\t\tkeyControl.style.visibility = 'hidden';"]
["\t}"]
["\telse"]
["\t{"]
["\t\tkeyControl.style.visibility = 'visible';"]
["\t\tkeyControl.style.right = margin + 'px';"]
["\t\t"]
["\t\tif ( showKeys )"]
["\t\t{"]
["\t\t\tkeyControl.style.top ="]
["\t\t\t\timageHeight -"]
["\t\t\t\t("]
["\t\t\t\t\tkeys * (keySize + keyBuffer) -"]
["\t\t\t\t\tkeyBuffer +"]
["\t\t\t\t\tmargin +"]
["\t\t\t\t\tkeyControl.clientHeight * 1.5"]
["\t\t\t\t) + 'px';"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tkeyControl.style.top ="]
["\t\t\t\t(imageHeight - margin - keyControl.clientHeight) + 'px';"]
["\t\t}"]
["\t}"]
["}"]
[]
["function updateView()"]
["{"]
["\tif ( selectedNode.depth > maxAbsoluteDepth - 1 )"]
["\t{"]
["\t\tmaxAbsoluteDepth = selectedNode.depth + 1;"]
["\t}"]
["\t"]
["\thighlightedNode = selectedNode;"]
["\t"]
["\tangleFactor = 2 * Math.PI / (selectedNode.magnitude);"]
["\t"]
["\tmaxPossibleDepth = Math.floor(gRadius / (fontSize * minRingWidthFactor));"]
["\t"]
["\tif ( maxPossibleDepth < 4 )"]
["\t{"]
["\t\tmaxPossibleDepth = 4;"]
["\t}"]
["\t"]
["\tvar minRadiusInner = fontSize * 8 / gRadius;"]
["\tvar minRadiusFirst = fontSize * 6 / gRadius;"]
["\tvar minRadiusOuter = fontSize * 5 / gRadius;"]
["\t"]
["\tif ( .25 < minRadiusInner )"]
["\t{"]
["\t\tminRadiusInner = .25;"]
["\t}"]
["\t"]
["\tif ( .15 < minRadiusFirst )"]
["\t{"]
["\t\tminRadiusFirst = .15;"]
["\t}"]
["\t"]
["\tif ( .15 < minRadiusOuter )"]
["\t{"]
["\t\tminRadiusOuter = .15;"]
["\t}"]
["\t"]
["\t// visibility of nodes depends on the depth they are displayed at,"]
["\t// so we need to set the max depth assuming they can all be displayed"]
["\t// and iterate it down based on the deepest child node we can display"]
["\t//"]
["\tvar maxDepth;"]
["\tvar newMaxDepth = selectedNode.getMaxDepth() - selectedNode.getDepth() + 1;"]
["\t//"]
["\tdo"]
["\t{"]
["\t\tmaxDepth = newMaxDepth;"]
["\t\t"]
["\t\tif ( ! compress && maxDepth > maxPossibleDepth )"]
["\t\t{"]
["\t\t\tmaxDepth = maxPossibleDepth;"]
["\t\t}"]
["\t\t"]
["\t\tif ( compress )"]
["\t\t{"]
["\t\t\tcompressedRadii = new Array(maxDepth);"]
["\t\t\t"]
["\t\t\tcompressedRadii[0] = minRadiusInner;"]
["\t\t\t"]
["\t\t\tvar offset = 0;"]
["\t\t\t"]
["\t\t\twhile"]
["\t\t\t("]
["\t\t\t\tlerp"]
["\t\t\t\t("]
["\t\t\t\t\tMath.atan(offset + 2),"]
["\t\t\t\t\tMath.atan(offset + 1),"]
["\t\t\t\t\tMath.atan(maxDepth + offset - 1),"]
["\t\t\t\t\tminRadiusInner,"]
["\t\t\t\t\t1 - minRadiusOuter"]
["\t\t\t\t) - minRadiusInner > minRadiusFirst &&"]
["\t\t\t\toffset < 10"]
["\t\t\t)"]
["\t\t\t{"]
["\t\t\t\toffset++;"]
["\t\t\t}"]
["\t\t\t"]
["\t\t\toffset--;"]
["\t\t\t"]
["\t\t\tfor ( var i = 1; i < maxDepth; i++ )"]
["\t\t\t{"]
["\t\t\t\tcompressedRadii[i] = lerp"]
["\t\t\t\t("]
["\t\t\t\t\tMath.atan(i + offset),"]
["\t\t\t\t\tMath.atan(offset),"]
["\t\t\t\t\tMath.atan(maxDepth + offset - 1),"]
["\t\t\t\t\tminRadiusInner,"]
["\t\t\t\t\t1 - minRadiusOuter"]
["\t\t\t\t)"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tnodeRadius = 1 / maxDepth;"]
["\t\t}"]
["\t\t"]
["\t\tnewMaxDepth = selectedNode.maxVisibleDepth(maxDepth);"]
["\t\t"]
["\t\tif ( compress )"]
["\t\t{"]
["\t\t\tif ( newMaxDepth <= maxPossibleDepth )"]
["\t\t\t{"]
["//\t\t\t\tcompress"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tif ( newMaxDepth > maxPossibleDepth )"]
["\t\t\t{"]
["\t\t\t\tnewMaxDepth = maxPossibleDepth;"]
["\t\t\t}"]
["\t\t}"]
["\t}"]
["\twhile ( newMaxDepth < maxDepth );"]
["\t"]
["\tmaxDisplayDepth = maxDepth;"]
["\t"]
["\tlightnessFactor = (lightnessMax - lightnessBase) / (maxDepth > 8 ? 8 : maxDepth);"]
["\tkeys = 0;"]
["\t"]
["\tnLabelOffsets = new Array(maxDisplayDepth - 1);"]
["\tlabelOffsets = new Array(maxDisplayDepth - 1);"]
["\tlabelLastNodes = new Array(maxDisplayDepth - 1);"]
["\tlabelFirstNodes = new Array(maxDisplayDepth - 1);"]
["\t"]
["\tfor ( var i = 0; i < maxDisplayDepth - 1; i++ )"]
["\t{"]
["\t\tif ( compress )"]
["\t\t{"]
["\t\t\tif ( i == maxDisplayDepth - 1 )"]
["\t\t\t{"]
["\t\t\t\tnLabelOffsets[i] = 0;"]
["\t\t\t}"]
["\t\t\telse"]
["\t\t\t{"]
["\t\t\t\tvar width ="]
["\t\t\t\t\t(compressedRadii[i + 1] - compressedRadii[i]) *"]
["\t\t\t\t\tgRadius;"]
["\t\t\t\t"]
["\t\t\t\tnLabelOffsets[i] = Math.floor(width / fontSize / 1.2);"]
["\t\t\t\t"]
["\t\t\t\tif ( nLabelOffsets[i] > 2 )"]
["\t\t\t\t{"]
["\t\t\t\t\tnLabelOffsets[i] = min"]
["\t\t\t\t\t("]
["\t\t\t\t\t\tMath.floor(width / fontSize / 1.75),"]
["\t\t\t\t\t\t5"]
["\t\t\t\t\t);"]
["\t\t\t\t}"]
["\t\t\t}"]
["\t\t}"]
["\t\telse"]
["\t\t{"]
["\t\t\tnLabelOffsets[i] = Math.max"]
["\t\t\t("]
["\t\t\t\tMath.floor(Math.sqrt((nodeRadius * gRadius / fontSize)) * 1.5),"]
["\t\t\t\t3"]
["\t\t\t);"]
["\t\t}"]
["\t\t"]
["\t\tlabelOffsets[i] = Math.floor((nLabelOffsets[i] - 1) / 2);"]
["\t\tlabelLastNodes[i] = new Array(nLabelOffsets[i] + 1);"]
["\t\tlabelFirstNodes[i] = new Array(nLabelOffsets[i] + 1);"]
["\t\t"]
["\t\tfor ( var j = 0; j <= nLabelOffsets[i]; j++ )"]
["\t\t{"]
["\t\t\t// these arrays will allow nodes with neighboring labels to link to"]
["\t\t\t// each other to determine max label length"]
["\t\t\t"]
["\t\t\tlabelLastNodes[i][j] = 0;"]
["\t\t\tlabelFirstNodes[i][j] = 0;"]
["\t\t}"]
["\t}"]
["\t"]
["\tfontSizeText.innerHTML = fontSize;"]
["\tfontNormal = fontSize + 'px ' + fontFamily;"]
["\tcontext.font = fontNormal;"]
["\tfontBold = 'bold ' + fontSize + 'px ' + fontFamily;"]
["\ttickLength = fontSize * .7;"]
["\t"]
["\thead.setTargets(0);"]
["\t"]
["\tkeySize = ((imageHeight - margin * 3) * 1 / 2) / keys * 3 / 4;"]
["\t"]
["\tif ( keySize > fontSize * maxKeySizeFactor )"]
["\t{"]
["\t\tkeySize = fontSize * maxKeySizeFactor;"]
["\t}"]
["\t"]
["\tkeyBuffer = keySize / 3;"]
["\t"]
["\tfontSizeLast = fontSize;"]
["\t"]
["\tif ( datasetChanged )"]
["\t{"]
["\t\tdatasetChanged = false;"]
["\t}"]
["\telse"]
["\t{"]
["\t\tdatasetAlpha.start = 0;"]
["\t}"]
["\t"]
["\tvar date = new Date();"]
["\ttweenStartTime = date.getTime();"]
["\tprogress = 0;"]
["\ttweenFrames = 0;"]
["\t"]
["\tupdateKeyControl();"]
["\tupdateDatasetWidths();"]
["\t"]
["\tdocument.title = 'Krona - ' + selectedNode.name;"]
["\tupdateNavigationButtons();"]
["\tsnapshotButton.disabled = true;"]
["\t"]
["\tmaxAbsoluteDepthText.innerHTML = maxAbsoluteDepth - 1;"]
["\t"]
["\tmaxAbsoluteDepthButtonDecrease.disabled = (maxAbsoluteDepth == 2);"]
["\tmaxAbsoluteDepthButtonIncrease.disabled = (maxAbsoluteDepth == head.maxDepth);"]
["\t"]
["\tif ( collapse != collapseLast && search.value != '' )"]
["\t{"]
["\t\tonSearchChange();"]
["\t\tcollapseLast = collapse;"]
["\t}"]
["}"]
[]
["function updateMaxAbsoluteDepth()"]
["{"]
["\twhile ( maxAbsoluteDepth > 1 && selectedNode.depth > maxAbsoluteDepth - 1 )"]
["\t{"]
["\t\tselectedNode = selectedNode.getParent();"]
["\t}"]
["}"]
[]
["function updateNavigationButtons()"]
["{"]
["\tbackButton.disabled = (nodeHistoryPosition == 0);"]
["//\tupButton.disabled = (selectedNode.getParent() == 0);"]
["\tforwardButton.disabled = (nodeHistoryPosition == nodeHistory.length);"]
["}"]
[]
["function useHue()"]
["{"]
["\treturn useHueCheckBox && useHueCheckBox.checked;"]
["}"]
["/*"]
["function zoomOut()"]
["{"]
["\treturn ("]
["\t\tselectedNodeLast != 0 &&"]
["\t\tselectedNodeLast.getDepth() < selectedNode.getDepth());"]
["}"]
["*/"]

{"sheet":"images","index":3,"n_rows":6,"n_cols":2,"rows_kept":6,"cut":false,"hidden":true,"merged":[]}
["shortcut","data:image/x-icon;base64,AAABAAMAEBAAAAEAIABoBAAANgAAABgYAAABACAAiAkAAJ4EAAAgIAAAAQAgAKgQAAAmDgAAKAAAABAAAAAgAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wCAgIAC////AP///wC0tKJHlZWSqI6OmuRxcXn9koaK9J2Ym8uNm5V73PPoFv///wAAAAAD////AP///wCAgIAC////AP//7xCHh4OodHSi/2xqw/9nZ9H/XVuU/9eFqv/njb7/yYiq/5GAiOifqKJV////AAAAAAL///8A////AO3t2w56eoHPdHLH/3Vz3vx4dtz7dXTb/mVimv/XhKn/8ZPG/fSVx/vvlcT/kG+E/32Himb///8AAAAAA////wB0dHageHbO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EAAAABAAADgQAAA8EAAAPBAAADgQAAAAEAAIABAACAAwAAwAcAAOAPAAD4PwAAKAAAABgAAAAwAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AP///wEAAAAB////AP///wi6urdDubmxj6ennsuQkIzvc3Nz/YSIh/WWoZzWrrezoLe6t1X///8T////AP///wCAgIAC////AP///wD///8A////AP///wD///8A////Af///wD///8Ax8fDQJeYkLV4eH39WlmM/19dpP9dX6b/WFRr/611j/+/fJ//om2I/4N3ff+Jko7Ntri2Xv///wD///8AgICAAv///wD///8A////AP///wD///8B////AP///wOfn5t9c3N29GRjn/9oZ8P/c3LU/XVy3P9rbdH/YVt8/9eIrv/5mcz/75bE/t+Mt/67epz/fnN5/4uTkKP///8W////AAAAAAL///8A////AP///wH///8A////A5iYkZJoaH3/bWvB/3h23Px4dt3+dHPX/3Rx1v9sbcv/YFp6/82ApP/rj8D/65DA//KVxv/1mcn83424/5t1iP98gX7A////F////wCAgIAC////AAAAAAL///8AkJCHdWZlf/9zcs7/fHrj/Hh32/92ddn/dXTX/3Zz2P9vcM//YFt7/8t9of/pi73/54u7/+eNvf/vk8P/7ZbE/pxsh/xLVU7/iomJqP///wD///8A////Af///wCfn5Y4ZmV07XZ0zv9+fOX8enjc/3p43P94dtv/dnXZ/3d12f9xcdD/YFp6/8h5nf/mh7r/44e3/+qMvf/ljrv/jV59/3F+V/68wH3/gYNp/4uIlWf///8AAAAAAv///wJ3d22pc3G6/4KA5/t9e9//fHre/3t53f96eNz/eHbZ/3l23P50dNb9Ylx+/ch2m/3jg7b+44W2/+CItv+NXXz/bnpW/8XIgv/Y3Yv8ur57/3Fxbtni4uIa////AHl5XTdoZ4b4f3zb/4F+5P5+fN//fXvf/3x63v96edz/ennf/nt54P9xccb/Xlxy/7Rvj//gf7P/3IKw/olZeP9te1b/xsqD/9DVh//P1IX/09iG/pWYcf9nZ3Nt////AISEb35ycLb/hYPr/YB+4f9/feH/fnzh/3173/99e+L+enjX/2dmmfhlZXiwYGBiknJkaqGVZ37pg11x/3eBXP7GyoP/0NWH/87Uhf/R1ob/2eCK+8HFff9tbXWv////BG9vdb16eMn/hYPq/4F/4/+BfuP/gH7i/4B94v59e93/Y2KO+ISEbX7y8uQT////AP///weAjo5aT1tP5L7Cf//T2Ij+ztOF/9HWhv/S14b/2d+K/s3Sgv+BgnLcg4OSI11deeaBf9r/hYPo/4OB5P+DgeX/gX/i/4OB6v10c77/cXFjmv///wL///8A////AP///wD///8AeHN9apuecP/U2Yf/0teG/tPZhv/V24f/2uCJ/tTahv+KjGj6AABINV9egfuGg+P/hoTp/4WC5v+EgeX/goDk/4WD6/1wbq//WFgAQ////wAzMzMFAAAAAVVVVQP///8AAABjEoiLZ/Df5Y7/2d+J/dfch//W3If/2d+H/9vhif6ZnW3/AAA5P19egvuHheX/iIXq/4eE6P+Gg+f/hILl/4eE7P1xb7D/WFgAQ////wAzMzMFAAAAAVVVVQP///8AAABVEnd1WvDEx37/y9GD/dnfif/g54z/4OeL/97kiv6anWz/AAA1P15eeuaFg93/ioft/4iF6f+Hhen/hoPn/4mG7/14d8L/cXFimv///wP///8A////AP///wD///8AenV3a1dyZf9QY1//bGVW/pORY/+trnD/xch7/tTZhP+Pkmn6AABINXBwdb1/fc7/jYry/4mH6v+Jhur/iIbp/4iG6/6Gg+X/Z2aT+IKEaX7y8uQT////AP///wiXgY9bXndp5HXLnv95z6P+dsif/2Wrjv9RcWv/Z3Rk/nyBYv9xcWbbfHyDI4SEa354d73/kI31/YuI6/+LiOz/iofr/4mG6v+Lh+3+hoPi/21soPhnZ3qwYGBikmNza6JhinXpcsWa/3vdq/6C4a//iOi1/4zpt/+O6Lf/kOu8+3O1l/9jVmKv////BHl5WDdraor4iofn/4+M8v6Miez/i4nt/4uI7P+LiOv/i4jt/ouJ8P9+e83/XGBt/223jv952aj/e9uq/n3aqv+D36//huKy/4rntv+Q7r3/lvTC/nupj/9zYmxt////AP///wJ3d2qpfXvF/5KP9vyNiu7/jYru/4yJ7f+Miu7/i4jr/46L8P6FgN79XmZ5/XTMm/1+3q7+f9ys/4Lgr/+G5LP/iue2/4zot/+V9cL8iNWs/3BxcNni4uIa////AP///wCfn5I4aGd17YeE3v+Ukfj8jovu/46L7/+Oi+//jYru/46M8f+FgNv/XmV3/3jMnf+D4rH/g+Cw/4fks/+K57b/jem4/5TywP6Q57n/bYh5/5KIjWf///8AAAAAAgAAAAL///8AkJCFdWtqhf+IheL/lZL5/JCN8P+PjO//j4zv/5GO8/+Hgt3/X2Z4/33Rof+I5rb/h+Sz/4nmtf+N6rn/lPPB/pHruvxxm4T/h3yDqP///wD///8A////Af///wH///8A////A5aWj5JtbIP/g4DW/5SR9vyVkvj+kY7y/5KP9P+Ig97/X2d4/4DUpf+N6rn/jeq4/5Lwvv+U88D8h9qu/3KVgv+Lgoe/////F////wCAgIAC////AP///wD///8B////AP///wOfn5l9dHR39HVzsf+Fg97/k4/x/ZiW/v+Nh+f/YWl7/4ngrv+W+MX/kuy8/onesP52uZb/dH54/5aOk6P///8W////AAAAAAL///8A////AP///wD///8A////Af///wD///8Ax8fDQJWVjbV5eX79amic/3h2vv93crf/WV9r/3W1kP95vZn/aZ2C/3eCfP+Ui5DNu7i7Xv///wD///8AgICAAv///wD///8A////AP///wD///8A////AP///wEAAAAB////AP///wi6urdDuLitj6WmmcuPj4rvc3Nz/YiEh/Whlp3Wt66zoLq3ulX///8T////AP///wD///8C////AP///wD///8A////AP8B/wD8AH8A+AAfAOAADwDgAAcAwAAHAIAAAwCAAAMAgAABAAB8AQAAfgEAAP4BAAD+AQAAfgEAAHwBAIAAAQCAAAMAgAADAMAABwDgAAcA4AAPAPgAHwD8AH8A/wH/ACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////KO3t7XXFxcWwqqqq25eXl/RwcHD9mJiY9Kurq9vHx8ew8PDwdf///yj///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AAAAAAP///wD///8A////AP///wD///8A////AP///wD///8A9/f3TLS0tLpvb3H/UVFR/1VVWf9bW27/WVlz/1FRUf96ZG//c2Nr/1lWV/9RUVH/d3V2/7m5ubr5+flM////AP///wD///8A////AP///wD///8A////AP///wAAAAAA////AP///wD///8A////AP///wD///8A/f39HLW1tatbW13/V1de/2FgkP9rabv/cG7S/29u0/9paL7/UVFR/9GIrv/wlcX/75bE/8+Irf+ZcYb/XVhb/2FfYP+8vLyr/v7+HP///wD///8A////AP///wD///8A////AAAAAAD///8A////AP///wD///8A////AOvr60l2dnnpVVVZ/2ZlnP9ycdL/c3LW/3Jx1f9xcNT/cG/T/2ppvv9RUVH/zoSs/+yRwf/uk8L/7pPC/++UxP/pk8D/pXaP/1hVV/9/fn/p7+/vSf///wD///8A////AP///wD///8AAAAAAP///wD///8A////AP///wDg4OBWX19h/11dcv9zccr/d3XZ/3Z02P91c9f/dHLX/3Nx1v9xcNT/a2q//1FRUf/Ngqn/6o6+/+uQwP/tksH/7pPD/++Vxf/xl8b/3I64/3Jiav9lY2T/2dnZVv///wD///8A////AP///wAAAAAA////AP///wD///8A5OTkQ1tbXf9hYIH/eHfY/3l32/94dtr/d3ba/3Z12f90c9f/c3LW/3Nx1f9tbMH/UVFR/8l/pf/mirr/6Iy8/+mOvv/qj7//7JHB/++VxP/xl8b/04qx/1RUUv9ZWVj/6+vrQ////wD///8A////AAAAAAD///8A////APX19Q9mZmjfYF98/3t53P97ed3/enjc/3l32/93dtr/dnXZ/3Z02P91c9f/dXTY/25tw/9RUVH/yHyj/+WIuf/libn/54q7/+mNvf/rj7//7JHB/9WJsf9XVlX/Z2hb/3BxX/9vb23f+fn5D////wD///8AAAAAAP///wD///8AkZCSnFpaZ/97edn/fHre/3t53v97ed3/enjc/3l33P94dtv/dnXZ/3V02P92dNj/cG7D/1FRUf/FeaH/4oW2/+OGt//liLj/54q6/+mOvv/Sha3/V1VV/2doW//FyYL/xcqC/19fWf+fn5+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///wD///8A////AP///wD///8A////AKampkBqa17/0teG/9LXhv/T2Yf/1dqH/9bciP/Y3oj/2N6H/9rgiP+5vXr/UlJS7AAAAABRUVH7gX7W/4eE6P+GhOj/hYPn/4WC5v+EgeX/g4Hl/4OB5f9/fNv/UVFR/9zc3AD///8A////AP///wD///8A////AP///wD///8A0NDQAFRUU//R14b/1dqH/9Xbh//W3If/192H/9jeh//a4Ij/3OKI/8PJfv9RUVH7AAAAAFFRUfuCgNj/iIbq/4eE6P+HhOj/hoPn/4WC5v+Egub/hILm/4B+3f9RUVH/3NzcAP///wD///8A////AP///wD///8A////AP///wDLy8sAUlJR/87ThP/W3Ij/192H/9nfiP/Z34j/2uCI/9vhiP/d44j/xMh+/1FRUfsAAAAAUVFR7H99zv+Jh+v/iIXq/4iF6v+Hhen/hoTo/4aD5/+Fgub/hYLm/1taZP+xsbFA////AP///wD///8A////AP///wD///8A////AJWVlUBSUlH/UlJR/25vXf+Ul2z/ur97/9jeh//c44j/3uWJ/97lif+8wXr/UVFR7AAAAABaWlzMd3W4/4qH6/+Kh+v/iYbq/4iF6f+HhOj/iIXp/4aE6P+GhOj/a2qe/19fYr/x8fEg////AP///wD///8A////AP///wDp6ekgW1xcv2SWe/9nm4D/Wm9k/1daVv9RUVH/VlZT/3p8Yf+ipnH/ys+A/6ircv9lZmPMAAAAAHp6fJ5rapf/i4js/4uJ7f+KiOz/iYbq/4mG6v+Ihur/iIbq/4eE6P+FguP/Xl5w/2xsb6Df399A////AP///wD///8A2traQGVnZqBccGX/d9Sk/3vZqf+B367/g+Gw/33No/9qk33/W2lh/1ZXVP9RUVH/U1NR/3d3dZ4AAAAAq6urYF5ea/+Ni+//jInt/4uI7P+LiOz/iofr/4mG6v+Jhur/iIXp/4iF6f+EguD/ZGSB/1FRUb9ra2+AZWdmgGpubIBRUVG/Xn1u/3TOn/9516f/ftyr/4Herf+G47L/iOa1/4vot/+Q7bz/k+++/4PHo/9SVFP/oaGhYAAAAADn5+cSUVFR/4F/z/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v/ku++/4rXrv9hcGj/aGpp/+np6Vb///8A////AP///wD///8AAAAAAP///wD///8A////AP///wD///8A7OzsSXd3eelWVlr/dXOr/5CO7v+TkPT/k5D0/5KP8/+Sj/P/f33F/1FRUf+I267/kO28/5Dsu/+Q7Lv/ku+9/5Douv9zoon/U1VU/4GDgunx8fFJ////AP///wD///8A////AP///wAAAAAA////AP///wD///8A////AP///wD///8A/f39HLW1tatbW13/WVlg/3Bunv+Gg9T/k4/y/5SR9f+Bfsf/UVFR/4vfsv+S773/kOu7/4TKpf9ul4H/VlpY/19hYP/AwMCr////HP///wD///8A////AP///wD///8A////AAAAAAD///8A////AP///wD///8A////AP///wD///8A////APf390y0tLS6cG9y/1FRUf9WVlr/Y2J2/2Fgdv9RUVH/ZYBx/2N1a/9VV1b/UVFR/3R2df+/v7+6+vr6TP///wD///8A////AP///wD///8A////AP///wD///8AAAAAAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8o7e3tdcXFxbCqqqrbl5eX9HBwcP2YmJj0q6ur28fHx7Dv7+91////KP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAA//Af//+AA//+AAD//AAAf/gAAD/wAAAf4AAAD8AAAAfAAAAHgAAAA4AAAAOAAAADAAfAAQAP4AEAH/ABAB/wAQAf8AEAH/ABAA/gAQAHwAGAAAADgAAAA4AAAAPAAAAHwAAAB+AAAA/wAAAf+AAAP/wAAH/+AAD//4AD///wH/8="]
["hidden","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oLCBQhNQwWVnsAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAABE0lEQVQYGQEIAff+AwAAABkAAAAAAAAA+gAAAAAAAAAAAAAAAAAAAAAAAAAMAwAAAAAAAAANAAAAAAA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