annotate test-data/krona_test1.html @ 9:1334cb4c6b68 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
author iuc
date Sat, 30 Nov 2019 13:05:03 -0500
parents 50f204c82159
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3 <head>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4 <meta charset="utf-8"/>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5 <link rel="shortcut icon" href="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/3585fl5d9r/dnTX/3V02/5mYpz80X2i/eaIuv/ukcD/wXak/I6Maf+OkXD9iIKjL////wCEhFo+c3Kv/4F+6P18etz/e3nd/3l33P57eeT/aWag/9F5oP/sib3+tmuZ/3uEXf/P1YX7zdKG/3x9dbX///8Ac3J9nYKA4f+CgOb7fnzf/3174P58et//bm2v8Vtgc7SdbIHNqWmM/4aLZP/L0YT/0dWH/tfdiP+go3P6YlyWJ3BvmduGg+n/g4Hk/oF+4/6AfuX/bm2k7pCUUUX///8Ajv/jCVBmXqPBxoH/1NmI/c7Uhf/b4Yn9wMWB/2BdcGBraqX6iYbs/4SB5P+Eguj7hYPm/2Vlcov///8AACRtB////wAAAIAWrLB29uHojv/X3on+3eSK+9PYh/9XWVN7bWum+ouI7/+Gg+f/hoTq+4iF6f9lZXKL////ACQAbQf///8AAABoFoF+Xva0snL/y818/uDmiPvZ34n/WVlTe3Jxm9uMiu//iofr/oiG6f6Jhu3/cnGo7oyQQ0X///8A/znjCXF8dKNotpL/Za2O/WuVe/+FkGv9mJ5w/2pqaGBzc3+djYrr/42K8fuKh+v/i4js/oqH6/93dbfxYmJztGaTec1yxJr/gOGu/4nptf+K6Lf+i+q8/2eXhfqDNG8ngIBKPnt6uP+Rjvf9jInr/4yJ7f+Miu3+jor0/25xoP920pz/gOGw/oHerv+H4rL/kPC9+5Ttvf98ioC1////AP///wB0dHSgioff/5SR+/mOi+7/jYvt/4+L8P5scJ78etKe/YXis/+H47P/kO+8/JLxv/92m4f9nXKNL////wD///8A7e3bDnt7hM+Ihdv/ko/4/JSS+PuUkPb+bnKg/4Lapv+Q7739kfO/+43puf9/qJH/mYeUZv///wAAAAADgICAAv///wD//+8QhoaBqIB/sf+Iht7/jYjw/2tvnf+D3Kf/ieS1/4bIpP+AkYfoqJOfVf///wAAAAAC////AP///wCAgIAC////AP///wCwsJdHlZWQqJORn+RzdHv9hZOK9Jecmcuej5l7/+jzFv///wAAAAAD////AP///wD4PwAA4A8AAMAHAACAAwAAgAEAAAABAAADgQAAA8EAAAPBAAADgQAAAAEAAIABAACAAwAAwAcAAOAPAAD4PwAAKAAAABgAAAAwAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///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+c////AP///wAAAAAA////ANjY2DhRUVL/dXPA/3994f9+fOD/fXvf/3x63v97ed3/enjc/3l32/94dtr/eHba/3d12f9xb8T/UVFR/8J1nf/fgLH/4IOz/+KEtf/liLn/zoCq/1dVVf9naFr/w8eA/83Shf/P1Yb/q652/1JSUf/h4eE4////AAAAAAD///8Afn6ApWNigv+BfuL/gH3h/3584P99e9//fHre/3x63v97ed3/eXjc/3l32/95d9v/d3ba/3Fwxf9RUVH/wXSc/9x9r//fgbL/4YO0/8t9pv9XVVT/Z2ha/8LHgf/N0oX/ztOF/8/Uhv/S14b/c3Vh/42Ni6X///8AAAAAAOfn5xJRUVH/eXbG/4F/4/+AfuL/f33h/3584P99e+D/fHrf/3x63v97ed3/e3ne/3p43f9ycMH/Y2OR/1FRUf+NY3j/w3Sd/9x9rv/IeaL/V1VU/2doWv/DyIH/zNGF/87Thf/Q1Yb/0daG/9TZh/+ytnj/UlJS/+/v7xIAAAAAq6urYF1cav+DgeX/goDk/4F/4/+AfuL/f33h/3994f9+fOD/fXvf/3x63v95d9X/YF99/1FRUb9sbG+AZmVmgG1qa4BRUVG/fWBv/1dVVP9naFr/xMiB/83Shv/O04b/z9WG/9HWhv/S14b/1NqH/9TZhv9fYFn/t7e3YAAAAAB6enyeaGeV/4SC5v+DgeX/goDk/4F+4/+BfuP/f33h/3584P9+fOD/fHrb/1xcbv9sbG6g39/fQP///wD///8A////ANra2kBbWlugVVVT/8LHgf/O04X/ztOF/8/Uhf/Q1Yb/0teG/9PZh//V24f/2N6I/4aIZv+IiIeeAAAAAFpaXMx0crX/hYLm/4SC5v+DgeX/goDk/4KA5P+Bf+P/gH7i/3994f9oZ5v/X19hv/Hx8SD///8A////AP///wD///8A////AOfn5yBcXFq/m55w/9DVhv/R1ob/0teG/9LXhv/T2Yb/1dqH/9jdiP/Z34j/o6Zy/2VlY8wAAAAAUVFR7Hx7zP+GhOj/hYLm/4SB5f+Egub/g4Hl/4KA5P+Bf+P/gX/j/1paZP+xsbFA////AP///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/+Niu7/jInt/4yJ7f+LiOz/i4nt/4qI7P+LiOz/iofr/4mG6v+Jhur/fnzN/2ZljP9RUVH/YpB5/2++lf921KT/edem/3vZqf+A3q3/hOGw/4bjs/+J5rX/juu6/5Dsu/+U8cD/g8Wi/1JTUv/t7e0SAAAAAP///wB+foClZ2aG/46L8P+Oi/D/jYru/4yJ7f+Mie3/i4js/4uI7P+LiOz/iofr/4qH6/+KiOz/eXjA/1FRUf9zyJz/eden/3zaqf982qn/ftys/4Hfrv+G47L/iOW0/4rntv+N6rn/ku++/5XxwP9le2//iYqKpf///wAAAAAA////ANjY2DhRUVL/gH7L/4+M8P+Oi+//jovv/42K7v+Niu7/jIru/4yK7v+Mie3/jInt/4uI7P96eMD/UVFR/3bLoP972an/ftyr/4Herv+D4K//heOy/4jmtf+L6Lf/juu5/5DtvP+V8cD/gcGf/1NUU//l5eU4////AAAAAAD///8A////AJGRkpxdXGn/jYrp/5CN8f+PjPD/j4zw/46L7/+Oi+//jYru/42K7v+Niu7/jYru/3x5wv9RUVH/ec6i/4Herv+B367/hOGw/4bjsv+I5bT/i+i3/43quf+Q7bz/k+++/4/jtv9bY17/nZ6enP///wD///8AAAAAAP///wD///8A9vb2D2Zmad9mZYL/kI3w/5CN8f+QjfH/j4zw/4+M8P+PjPD/j4zw/46L7/+Oi+//fHrD/1FRUf9/0qb/hOGw/4Xjsv+F47L/iOa1/4vot/+O67r/kO28/5Lvvf+S7b3/ZHht/3N1dN/6+voP////AP///wAAAAAA////AP///wD///8A5OTkQ1xcXv9oZ4j/kI3v/5GN8f+RjfH/kI3x/5CN8f+QjfH/kI3x/5CN8f99e8P/UVFR/3/UqP+I5bT/iOW0/4vot/+L6Lf/juu5/4/su/+S773/kem6/2Z9cf9gYmH/6+vrQ////wD///8A////AAAAAAD///8A////AP///wD///8A4ODgVl9fYf9iYnf/iojh/5KP8/+Sj/P/kY7y/5GO8v+RjvL/kY7y/358xf9RUVH/hdmt/4vot/+O67n/juu5/5Dtu/+Q7bv/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="/>
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6 <script id="notfound" type="text/javascript">window.onload=function(){document.body.innerHTML=""}</script>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
7 <script language="javascript" type="text/javascript">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
8 {//-----------------------------------------------------------------------------
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
9 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
10 // PURPOSE
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
11 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
12 // Krona is a flexible tool for exploring the relative proportions of
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
13 // hierarchical data, such as metagenomic classifications, using a
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
14 // radial, space-filling display. It is implemented using HTML5 and
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
15 // JavaScript, allowing charts to be explored locally or served over the
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
16 // Internet, requiring only a current version of any major web
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
17 // browser. Krona charts can be created using an Excel template or from
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
18 // common bioinformatic formats using the provided conversion scripts.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
19 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
20 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
21 // COPYRIGHT LICENSE
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
22 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
23 // Copyright (c) 2011, Battelle National Biodefense Institute (BNBI);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
24 // all rights reserved. Authored by: Brian Ondov, Nicholas Bergman, and
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
25 // Adam Phillippy
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
26 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
27 // This Software was prepared for the Department of Homeland Security
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
28 // (DHS) by the Battelle National Biodefense Institute, LLC (BNBI) as
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
29 // part of contract HSHQDC-07-C-00020 to manage and operate the National
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
30 // Biodefense Analysis and Countermeasures Center (NBACC), a Federally
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
31 // Funded Research and Development Center.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
32 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
33 // Redistribution and use in source and binary forms, with or without
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
34 // modification, are permitted provided that the following conditions are
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
35 // met:
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
36 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
37 // * Redistributions of source code must retain the above copyright
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
38 // notice, this list of conditions and the following disclaimer.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
39 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
40 // * Redistributions in binary form must reproduce the above copyright
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
41 // notice, this list of conditions and the following disclaimer in the
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
42 // documentation and/or other materials provided with the distribution.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
43 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
44 // * Neither the name of the Battelle National Biodefense Institute nor
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
45 // the names of its contributors may be used to endorse or promote
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
46 // products derived from this software without specific prior written
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
47 // permission.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
48 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
49 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
50 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
51 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
52 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
53 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
54 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
55 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
56 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
57 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
58 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
59 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
60 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
61 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
62 // TRADEMARK LICENSE
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
63 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
64 // KRONA(TM) is a trademark of the Department of Homeland Security, and use
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
65 // of the trademark is subject to the following conditions:
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
66 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
67 // * Distribution of the unchanged, official code/software using the
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
68 // KRONA(TM) mark is hereby permitted by the Department of Homeland
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
69 // Security, provided that the software is distributed without charge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
70 // and modification.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
71 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
72 // * Distribution of altered source code/software using the KRONA(TM) mark
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
73 // is not permitted unless written permission has been granted by the
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
74 // Department of Homeland Security.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
75 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
76 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
77 // FOR MORE INFORMATION VISIT
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
78 //
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
79 // https://github.com/marbl/Krona/wiki/
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
80 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
81 //-----------------------------------------------------------------------------
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
82 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
83
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
84
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
85 var canvas;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
86 var context;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
87 var svg; // for snapshot mode
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
88 var collapse = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
89 var collapseCheckBox;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
90 var collapseLast;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
91 var compress;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
92 var compressCheckBox;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
93 var maxAbsoluteDepthText;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
94 var maxAbsoluteDepthButtonDecrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
95 var maxAbsoluteDepthButtonIncrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
96 var fontSize = 11;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
97 var fontSizeText;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
98 var fontSizeButtonDecrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
99 var fontSizeButtonIncrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
100 var fontSizeLast;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
101 var radiusButtonDecrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
102 var radiusButtonIncrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
103 var shorten;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
104 var shortenCheckBox;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
105 var maxAbsoluteDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
106 var backButton;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
107 var upButton;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
108 var forwardButton;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
109 var snapshotButton;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
110 var snapshotMode = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
111 var details;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
112 var detailsName;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
113 var search;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
114 var searchResults;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
115 var nSearchResults;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
116 var useHueCheckBox;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
117 var useHueDiv;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
118 var datasetDropDown;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
119 var datasetButtonLast;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
120 var datasetButtonPrev;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
121 var datasetButtonNext;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
122 var keyControl;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
123 var showKeys = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
124 var linkButton;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
125 var linkText;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
126 var frame;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
127
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
128 // Node references. Note that the meanings of 'selected' and 'focused' are
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
129 // swapped in the docs.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
130 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
131 var head; // the root of the entire tree
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
132 var selectedNode = 0; // the root of the current view
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
133 var focusNode = 0; // a node chosen for more info (single-click)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
134 var highlightedNode = 0; // mouse hover node
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
135 var highlightingHidden = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
136 var nodes = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
137 var currentNodeID = 0; // to iterate while loading
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
138
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
139 var nodeHistory = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
140 var nodeHistoryPosition = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
141
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
142 var dataEnabled = false; // true when supplemental files are present
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
143
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
144 // store non-Krona GET variables so they can be passed on to links
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
145 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
146 var getVariables = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
147
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
148 // selectedNodeLast is separate from the history, since we need to check
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
149 // properties of the last node viewed when browsing through the history
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
150 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
151 var selectedNodeLast = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
152 var zoomOut = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
153
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
154 // temporary zoom-in while holding the mouse button on a wedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
155 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
156 var quickLook = false; // true when in quick look state
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
157 var mouseDown = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
158 var mouseDownTime; // to detect mouse button hold
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
159 var quickLookHoldLength = 200;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
160
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
161 var imageWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
162 var imageHeight;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
163 var centerX;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
164 var centerY;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
165 var gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
166 var updateViewNeeded = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
167
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
168 // Determines the angle that the pie chart starts at. 90 degrees makes the
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
169 // center label consistent with the children.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
170 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
171 var rotationOffset = Math.PI / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
172
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
173 var buffer;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
174 var bufferFactor = .1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
175
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
176 // The maps are the small pie charts showing the current slice being viewed.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
177 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
178 var mapBuffer = 10;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
179 var mapRadius = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
180 var maxMapRadius = 25;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
181 var mapWidth = 150;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
182 var maxLabelOverhang = Math.PI * 4.18;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
183
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
184 // Keys are the labeled boxes for slices in the highest level that are too thin
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
185 // to label.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
186 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
187 var maxKeySizeFactor = 2; // will be multiplied by font size
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
188 var keySize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
189 var keys;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
190 var keyBuffer = 10;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
191 var currentKey;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
192 var keyMinTextLeft;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
193 var keyMinAngle;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
194
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
195 var minRingWidthFactor = 5; // will be multiplied by font size
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
196 var maxPossibleDepth; // the theoretical max that can be displayed
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
197 var maxDisplayDepth; // the actual depth that will be displayed
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
198 var headerHeight = 0;//document.getElementById('options').clientHeight;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
199 var historySpacingFactor = 1.6; // will be multiplied by font size
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
200 var historyAlphaDelta = .25;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
201
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
202 // appearance
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
203 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
204 var lineOpacity = 0.3;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
205 var saturation = 0.5;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
206 var lightnessBase = 0.6;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
207 var lightnessMax = .8;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
208 var thinLineWidth = .3;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
209 var highlightLineWidth = 1.5;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
210 var labelBoxBuffer = 6;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
211 var labelBoxRounding = 15;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
212 var labelWidthFudge = 1.05; // The width of unshortened labels are set slightly
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
213 // longer than the name width so the animation
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
214 // finishes faster.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
215 var fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
216 var fontBold;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
217 var fontFamily = 'sans-serif';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
218 //var fontFaceBold = 'bold Arial';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
219 var nodeRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
220 var angleFactor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
221 var tickLength;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
222 var compressedRadii;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
223
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
224 // colors
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
225 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
226 var highlightFill = 'rgba(255, 255, 255, .3)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
227 var colorUnclassified = 'rgb(220,220,220)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
228
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
229 // label staggering
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
230 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
231 var labelOffsets; // will store the current offset at each depth
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
232 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
233 // This will store pointers to the last node that had a label in each offset (or "track") of a
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
234 // each depth. These will be used to shorten neighboring labels that would overlap.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
235 // The [nLabelNodes] index will store the last node with a radial label.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
236 // labelFirstNodes is the same, but to check for going all the way around and
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
237 // overlapping the first labels.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
238 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
239 var labelLastNodes;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
240 var labelFirstNodes;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
241 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
242 var nLabelOffsets = 3; // the number of offsets to use
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
243
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
244 var mouseX = -1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
245 var mouseY = -1;
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
246 var mouseXRel = -1;
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
247 var mouseYRel = -1;
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
248
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
249 // tweening
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
250 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
251 var progress = 0; // for tweening; goes from 0 to 1.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
252 var progressLast = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
253 var tweenFactor = 0; // progress converted by a curve for a smoother effect.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
254 var tweenLength = 850; // in ms
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
255 var tweenCurvature = 13;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
256 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
257 // tweenMax is used to scale the sigmoid function so its range is [0,1] for the
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
258 // domain [0,1]
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
259 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
260 var tweenMax = 1 / (1 + Math.exp(-tweenCurvature / 2));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
261 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
262 var tweenStartTime;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
263
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
264 // for framerate debug
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
265 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
266 var tweenFrames = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
267 var fpsDisplay = document.getElementById('frameRate');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
268
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
269 // Arrays to translate xml attribute names into displayable attribute names
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
270 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
271 var attributes = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
272 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
273 var magnitudeIndex; // the index of attribute arrays used for magnitude
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
274 var membersAssignedIndex;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
275 var membersSummaryIndex;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
276
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
277 // For defining gradients
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
278 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
279 var hueDisplayName;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
280 var hueStopPositions;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
281 var hueStopHues;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
282 var hueStopText;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
283
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
284 // multiple datasets
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
285 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
286 var currentDataset = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
287 var lastDataset = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
288 var datasets = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
289 var datasetNames;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
290 var datasetSelectSize = 30;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
291 var datasetAlpha = new Tween(0, 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
292 var datasetWidths = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
293 var datasetChanged;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
294 var datasetSelectWidth = 50;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
295
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
296 window.onload = load;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
297
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
298 var image;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
299 var hiddenPattern;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
300 var loadingImage;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
301 var logoImage;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
302
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
303 function backingScale()
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
304 {
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
305 if ('devicePixelRatio' in window)
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
306 {
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
307 if (window.devicePixelRatio > 1)
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
308 {
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
309 return window.devicePixelRatio;
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
310 }
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
311 }
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
312
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
313 return 1;
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
314 }
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
315
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
316 function resize()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
317 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
318 imageWidth = window.innerWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
319 imageHeight = window.innerHeight;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
320
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
321 if ( ! snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
322 {
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
323 context.canvas.width = imageWidth * backingScale();
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
324 context.canvas.height = imageHeight * backingScale();
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
325 context.canvas.style.width = imageWidth + "px"
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
326 context.canvas.style.height = imageHeight + "px"
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
327 context.scale(backingScale(), backingScale());
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
328 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
329
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
330 if ( datasetDropDown )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
331 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
332 var ratio =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
333 (datasetDropDown.offsetTop + datasetDropDown.clientHeight) * 2 /
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
334 imageHeight;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
335
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
336 if ( ratio > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
337 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
338 ratio = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
339 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
340
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
341 ratio = Math.sqrt(ratio);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
342
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
343 datasetSelectWidth =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
344 (datasetDropDown.offsetLeft + datasetDropDown.clientWidth) * ratio;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
345 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
346 var leftMargin = datasets > 1 ? datasetSelectWidth + 30 : 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
347 var minDimension = imageWidth - mapWidth - leftMargin > imageHeight ?
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
348 imageHeight :
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
349 imageWidth - mapWidth - leftMargin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
350
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
351 maxMapRadius = minDimension * .03;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
352 buffer = minDimension * bufferFactor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
353 margin = minDimension * .015;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
354 centerX = (imageWidth - mapWidth - leftMargin) / 2 + leftMargin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
355 centerY = imageHeight / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
356 gRadius = minDimension / 2 - buffer;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
357 //context.font = '11px sans-serif';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
358 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
359
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
360 function handleResize()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
361 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
362 updateViewNeeded = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
363 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
364
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
365 function Attribute()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
366 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
367 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
368
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
369 function Tween(start, end)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
370 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
371 this.start = start;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
372 this.end = end;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
373 this.current = this.start;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
374
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
375 this.current = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
376 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
377 if ( progress == 1 || this.start == this.end )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
378 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
379 return this.end;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
380 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
381 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
382 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
383 return this.start + tweenFactor * (this.end - this.start);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
384 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
385 };
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
386
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
387 this.setTarget = function(target)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
388 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
389 this.start = this.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
390 this.end = target;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
391 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
392 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
393
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
394 function Node()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
395 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
396 this.id = currentNodeID;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
397 currentNodeID++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
398 nodes[this.id] = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
399
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
400 this.angleStart = new Tween(Math.PI, 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
401 this.angleEnd = new Tween(Math.PI, 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
402 this.radiusInner = new Tween(1, 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
403 this.labelRadius = new Tween(1, 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
404 this.labelWidth = new Tween(0, 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
405 this.scale = new Tween(1, 1); // TEMP
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
406 this.radiusOuter = new Tween(1, 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
407
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
408 this.r = new Tween(255, 255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
409 this.g = new Tween(255, 255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
410 this.b = new Tween(255, 255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
411
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
412 this.alphaLabel = new Tween(0, 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
413 this.alphaLine = new Tween(0, 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
414 this.alphaArc = new Tween(0, 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
415 this.alphaWedge = new Tween(0, 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
416 this.alphaOther = new Tween(0, 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
417 this.alphaPattern = new Tween(0, 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
418 this.children = Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
419 this.parent = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
420
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
421 this.attributes = new Array(attributes.length);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
422
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
423 this.addChild = function(child)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
424 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
425 this.children.push(child);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
426 };
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
427
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
428 this.addLabelNode = function(depth, labelOffset)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
429 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
430 if ( labelHeadNodes[depth][labelOffset] == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
431 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
432 // this will become the head node for this list
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
433
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
434 labelHeadNodes[depth][labelOffset] = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
435 this.labelPrev = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
436 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
437
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
438 var head = labelHeadNodes[depth][labelOffset];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
439
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
440 this.labelNext = head;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
441 this.labelPrev = head.labelPrev;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
442 head.labelPrev.labelNext = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
443 head.labelPrev = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
444 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
445
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
446 this.canDisplayDepth = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
447 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
448 // whether this node is at a depth that can be displayed, according
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
449 // to the max absolute depth
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
450
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
451 return this.depth <= maxAbsoluteDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
452 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
453
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
454 this.canDisplayHistory = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
455 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
456 var radiusInner;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
457
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
458 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
459 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
460 radiusInner = compressedRadii[0];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
461 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
462 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
463 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
464 radiusInner = nodeRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
465 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
466
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
467 return (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
468 -this.labelRadius.end * gRadius +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
469 historySpacingFactor * fontSize / 2 <
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
470 radiusInner * gRadius
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
471 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
472 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
473
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
474 this.canDisplayLabelCurrent = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
475 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
476 return (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
477 (this.angleEnd.current() - this.angleStart.current()) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
478 (this.radiusInner.current() * gRadius + gRadius) >=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
479 minWidth());
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
480 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
481
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
482 this.checkHighlight = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
483 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
484 if ( this.children.length == 0 && this == focusNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
485 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
486 //return false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
487 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
488
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
489 if ( this.hide )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
490 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
491 return false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
492 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
493
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
494 if ( this.radiusInner.end == 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
495 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
496 // compressed to the outside; don't check
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
497
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
498 return false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
499 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
500
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
501 var highlighted = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
502
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
503 var angleStartCurrent = this.angleStart.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
504 var angleEndCurrent = this.angleEnd.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
505 var radiusInner = this.radiusInner.current() * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
506
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
507 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
508 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
509 highlighted = this.children[i].checkHighlight();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
510
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
511 if ( highlighted )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
512 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
513 return true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
514 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
515 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
516
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
517 if ( this.radial )
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
518 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
519 var angleText = (angleStartCurrent + angleEndCurrent) / 2;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
520 var radiusText = (gRadius + radiusInner) / 2;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
521
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
522 context.rotate(angleText);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
523 context.beginPath();
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
524 context.moveTo(radiusText, -fontSize);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
525 context.lineTo(radiusText, fontSize);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
526 context.lineTo(radiusText + centerX, fontSize);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
527 context.lineTo(radiusText + centerX, -fontSize);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
528 context.closePath();
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
529 context.rotate(-angleText);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
530
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
531 if ( context.isPointInPath(mouseXRel, mouseYRel) )
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
532 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
533 var label = String(this.getPercentage()) + '%' + ' ' + this.name;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
534
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
535 if ( this.searchResultChildren() )
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
536 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
537 label += searchResultString(this.searchResultChildren());
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
538 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
539
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
540 if
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
541 (
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
542 Math.sqrt((mouseXRel) * (mouseXRel) + (mouseYRel) * (mouseYRel)) / backingScale() <
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
543 radiusText + measureText(label)
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
544 )
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
545 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
546 highlighted = true;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
547 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
548 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
549 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
550 else
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
551 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
552 for ( var i = 0; i < this.hiddenLabels.length; i++ )
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
553 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
554 var hiddenLabel = this.hiddenLabels[i];
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
555
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
556 context.rotate(hiddenLabel.angle);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
557 context.beginPath();
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
558 context.moveTo(gRadius, -fontSize);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
559 context.lineTo(gRadius, fontSize);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
560 context.lineTo(gRadius + centerX, fontSize);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
561 context.lineTo(gRadius + centerX, -fontSize);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
562 context.closePath();
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
563 context.rotate(-hiddenLabel.angle);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
564
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
565 if ( context.isPointInPath(mouseXRel, mouseYRel) )
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
566 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
567 var label = String(hiddenLabel.value) + ' more';
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
568
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
569 if ( hiddenLabel.search )
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
570 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
571 label += searchResultString(hiddenLabel.search);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
572 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
573
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
574 if
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
575 (
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
576 Math.sqrt((mouseXRel) * (mouseXRel) + (mouseYRel) * (mouseYRel)) / backingScale() <
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
577 gRadius + fontSize + measureText(label)
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
578 )
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
579 {
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
580 highlighted = true;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
581 break;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
582 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
583 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
584 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
585 }
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
586
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
587 if ( ! highlighted && this != selectedNode && ! this.getCollapse() )
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
588 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
589 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
590 context.arc(0, 0, radiusInner, angleStartCurrent, angleEndCurrent, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
591 context.arc(0, 0, gRadius, angleEndCurrent, angleStartCurrent, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
592 context.closePath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
593
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
594 if ( context.isPointInPath(mouseXRel, mouseYRel) )
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
595 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
596 highlighted = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
597 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
598
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
599 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
600 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
601 ! highlighted &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
602 (angleEndCurrent - angleStartCurrent) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
603 (radiusInner + gRadius) <
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
604 minWidth() &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
605 this.getDepth() == selectedNode.getDepth() + 1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
606 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
607 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
608 if ( showKeys && this.checkHighlightKey() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
609 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
610 highlighted = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
611 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
612 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
613 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
614
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
615 if ( highlighted )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
616 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
617 if ( this != highlightedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
618 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
619 // document.body.style.cursor='pointer';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
620 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
621
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
622 highlightedNode = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
623 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
624
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
625 return highlighted;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
626 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
627
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
628 this.checkHighlightCenter = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
629 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
630 if ( ! this.canDisplayHistory() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
631 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
632 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
633 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
634
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
635 var cx = centerX;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
636 var cy = centerY - this.labelRadius.end * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
637 //var dim = context.measureText(this.name);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
638
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
639 var width = this.nameWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
640
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
641 if ( this.searchResultChildren() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
642 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
643 var results = searchResultString(this.searchResultChildren());
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
644 var dim = context.measureText(results);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
645 width += dim.width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
646 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
647
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
648 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
649 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
650 mouseX > cx - width / 2 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
651 mouseX < cx + width / 2 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
652 mouseY > cy - historySpacingFactor * fontSize / 2 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
653 mouseY < cy + historySpacingFactor * fontSize / 2
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
654 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
655 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
656 highlightedNode = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
657 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
658 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
659
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
660 if ( this.getParent() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
661 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
662 this.getParent().checkHighlightCenter();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
663 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
664 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
665
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
666 this.checkHighlightKey = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
667 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
668 var offset = keyOffset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
669
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
670 var xMin = imageWidth - keySize - margin - this.keyNameWidth - keyBuffer;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
671 var xMax = imageWidth - margin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
672 var yMin = offset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
673 var yMax = offset + keySize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
674
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
675 currentKey++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
676
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
677 return (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
678 mouseX > xMin &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
679 mouseX < xMax &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
680 mouseY > yMin &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
681 mouseY < yMax);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
682 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
683
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
684 this.checkHighlightMap = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
685 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
686 if ( this.parent )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
687 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
688 this.parent.checkHighlightMap();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
689 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
690
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
691 if ( this.getCollapse() || this == focusNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
692 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
693 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
694 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
695
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
696 var box = this.getMapPosition();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
697
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
698 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
699 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
700 mouseX > box.x - mapRadius &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
701 mouseX < box.x + mapRadius &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
702 mouseY > box.y - mapRadius &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
703 mouseY < box.y + mapRadius
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
704 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
705 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
706 highlightedNode = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
707 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
708 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
709
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
710 /* this.collapse = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
711 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
712 for (var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
713 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
714 this.children[i] = this.children[i].collapse();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
715 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
716
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
717 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
718 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
719 this.children.length == 1 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
720 this.children[0].magnitude == this.magnitude
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
721 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
722 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
723 this.children[0].parent = this.parent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
724 this.children[0].getDepth() = this.parent.getDepth() + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
725 return this.children[0];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
726 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
727 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
728 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
729 return this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
730 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
731 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
732 */
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
733 this.draw = function(labelMode, selected, searchHighlighted)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
734 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
735 var depth = this.getDepth() - selectedNode.getDepth() + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
736 // var hidden = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
737
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
738 if ( selectedNode == this )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
739 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
740 selected = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
741 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
742
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
743 var angleStartCurrent = this.angleStart.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
744 var angleEndCurrent = this.angleEnd.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
745 var radiusInner = this.radiusInner.current() * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
746 var canDisplayLabelCurrent = this.canDisplayLabelCurrent();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
747 var hiddenSearchResults = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
748
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
749 /* if ( ! this.hide )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
750 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
751 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
752 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
753 if ( this.children[i].hide && this.children[i].searchResults )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
754 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
755 hiddenSearchResults = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
756 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
757 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
758 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
759 */
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
760 var drawChildren =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
761 ( ! this.hide || ! this.hidePrev && progress < 1 ) &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
762 ( ! this.hideAlone || ! this.hideAlonePrev && progress < 1 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
763
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
764 // if ( this.alphaWedge.current() > 0 || this.alphaLabel.current() > 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
765 {
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
766 var lastChildAngleEnd = angleStartCurrent;
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
767
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
768 if ( this.hasChildren() )//canDisplayChildren )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
769 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
770 lastChildAngleEnd =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
771 this.children[this.children.length - 1].angleEnd.current()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
772 + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
773 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
774
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
775 if ( labelMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
776 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
777 var drawRadial =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
778 !(
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
779 this.parent &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
780 this.parent != selectedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
781 angleEndCurrent == this.parent.angleEnd.current() + rotationOffset
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
782 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
783
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
784 //if ( angleStartCurrent != angleEndCurrent )
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
785 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
786 this.drawLines(angleStartCurrent, angleEndCurrent, radiusInner, drawRadial, selected);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
787 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
788
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
789 var alphaOtherCurrent = this.alphaOther.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
790 var childRadiusInner;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
791
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
792 if ( this == selectedNode || alphaOtherCurrent )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
793 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
794 childRadiusInner =
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
795 this.children.length ?
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
796 this.children[this.children.length - 1].radiusInner.current() * gRadius
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
797 : radiusInner
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
798 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
799
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
800 if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
801 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
802 this.drawReferenceRings(childRadiusInner);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
803 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
804
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
805 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
806 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
807 selected &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
808 ! searchHighlighted &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
809 this != selectedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
810 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
811 this.isSearchResult ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
812 this.hideAlone && this.searchResultChildren() ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
813 false
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
814 // this.hide &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
815 // this.containsSearchResult
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
816 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
817 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
818 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
819 context.globalAlpha = this.alphaWedge.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
820
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
821 drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
822 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
823 angleStartCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
824 angleEndCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
825 radiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
826 gRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
827 highlightFill,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
828 0,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
829 true
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
830 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
831
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
832 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
833 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
834 this.keyed &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
835 ! showKeys &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
836 this.searchResults &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
837 ! searchHighlighted &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
838 this != highlightedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
839 this != focusNode
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
840 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
841 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
842 var angle = (angleEndCurrent + angleStartCurrent) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
843 this.drawLabel(angle, true, false, true, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
844 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
845
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
846 //this.drawHighlight(false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
847 searchHighlighted = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
848 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
849
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
850 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
851 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
852 this == selectedNode ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
853 // true
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
854 //(canDisplayLabelCurrent) &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
855 this != highlightedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
856 this != focusNode
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
857 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
858 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
859 if ( this.radial != this.radialPrev && this.alphaLabel.end == 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
860 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
861 context.globalAlpha = tweenFactor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
862 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
863 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
864 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
865 context.globalAlpha = this.alphaLabel.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
866 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
867
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
868 this.drawLabel
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
869 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
870 (angleStartCurrent + angleEndCurrent) / 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
871 this.hideAlone && this.searchResultChildren() ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
872 (this.isSearchResult || hiddenSearchResults) && selected,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
873 this == selectedNode && ! this.radial,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
874 selected,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
875 this.radial
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
876 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
877
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
878 if ( this.radial != this.radialPrev && this.alphaLabel.start == 1 && progress < 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
879 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
880 context.globalAlpha = 1 - tweenFactor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
881
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
882 this.drawLabel
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
883 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
884 (angleStartCurrent + angleEndCurrent) / 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
885 (this.isSearchResult || hiddenSearchResults) && selected,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
886 this == selectedNodeLast && ! this.radialPrev,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
887 selected,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
888 this.radialPrev
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
889 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
890 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
891 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
892
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
893 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
894 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
895 alphaOtherCurrent &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
896 lastChildAngleEnd != null
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
897 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
898 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
899 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
900 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
901 (angleEndCurrent - lastChildAngleEnd) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
902 (childRadiusInner + gRadius) >=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
903 minWidth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
904 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
905 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
906 //context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
907 context.globalAlpha = this.alphaOther.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
908
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
909 drawTextPolar
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
910 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
911 this.getUnclassifiedText(),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
912 this.getUnclassifiedPercentage(),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
913 (lastChildAngleEnd + angleEndCurrent) / 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
914 (childRadiusInner + gRadius) / 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
915 true,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
916 false,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
917 false,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
918 0,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
919 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
920 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
921 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
922 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
923
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
924 if ( this == selectedNode && this.keyUnclassified && showKeys )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
925 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
926 this.drawKey
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
927 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
928 (lastChildAngleEnd + angleEndCurrent) / 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
929 false,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
930 false
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
931 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
932 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
933 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
934 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
935 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
936 var alphaWedgeCurrent = this.alphaWedge.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
937
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
938 if ( alphaWedgeCurrent || this.alphaOther.current() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
939 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
940 var currentR = this.r.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
941 var currentG = this.g.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
942 var currentB = this.b.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
943
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
944 var fill = rgbText(currentR, currentG, currentB);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
945
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
946 var radiusOuter;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
947 var lastChildAngle;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
948 var truncateWedge =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
949 (
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
950 (this.hasChildren() || this == selectedNode ) &&
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
951 ! this.keyed &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
952 (compress || depth < maxDisplayDepth) &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
953 drawChildren
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
954 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
955
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
956 if ( truncateWedge )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
957 {
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
958 radiusOuter = this.children.length ? this.children[0].radiusInner.current() * gRadius : radiusInner;
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
959 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
960 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
961 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
962 radiusOuter = gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
963 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
964 /*
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
965 if ( this.hasChildren() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
966 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
967 radiusOuter = this.children[0].getUncollapsed().radiusInner.current() * gRadius + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
968 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
969 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
970 { // TEMP
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
971 radiusOuter = radiusInner + nodeRadius * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
972
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
973 if ( radiusOuter > gRadius )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
974 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
975 radiusOuter = gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
976 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
977 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
978 */
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
979 context.globalAlpha = alphaWedgeCurrent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
980
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
981 if ( radiusInner != radiusOuter || truncateWedge )
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
982 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
983 drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
984 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
985 angleStartCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
986 angleEndCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
987 radiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
988 radiusOuter,//this.radiusOuter.current() * gRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
989 //'rgba(0, 200, 0, .1)',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
990 fill,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
991 this.alphaPattern.current()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
992 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
993
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
994 if ( truncateWedge )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
995 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
996 // fill in the extra space if the sum of our childrens'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
997 // magnitudes is less than ours
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
998
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
999 if ( lastChildAngleEnd < angleEndCurrent )//&& false) // TEMP
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1000 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1001 if ( radiusOuter > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1002 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1003 // overlap slightly to hide the seam
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1004
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1005 // radiusOuter -= 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1006 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1007
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1008 if ( alphaWedgeCurrent < 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1009 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1010 context.globalAlpha = this.alphaOther.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1011 drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1012 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1013 lastChildAngleEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1014 angleEndCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1015 radiusOuter,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1016 gRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1017 colorUnclassified,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1018 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1019 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1020 context.globalAlpha = alphaWedgeCurrent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1021 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1022
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1023 drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1024 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1025 lastChildAngleEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1026 angleEndCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1027 radiusOuter,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1028 gRadius,//this.radiusOuter.current() * gRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1029 //'rgba(200, 0, 0, .1)',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1030 fill,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1031 this.alphaPattern.current()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1032 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1033 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1034 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1035
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1036 if ( radiusOuter < gRadius )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1037 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1038 // patch up the seam
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1039 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1040 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1041 context.arc(0, 0, radiusOuter, angleStartCurrent/*lastChildAngleEnd*/, angleEndCurrent, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1042 context.strokeStyle = fill;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1043 context.lineWidth = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1044 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1045 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1046 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1047
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1048 if ( this.keyed && selected && showKeys )//&& progress == 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1049 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1050 this.drawKey
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1051 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1052 (angleStartCurrent + angleEndCurrent) / 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1053 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1054 this == highlightedNode ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1055 this == focusNode ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1056 this.searchResults
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1057 ),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1058 this == highlightedNode || this == focusNode
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1059 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1060 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1061 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1062 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1063 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1064
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1065 this.hiddenLabels = Array();
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1066
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1067 if ( drawChildren )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1068 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1069 // draw children
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1070 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1071 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1072 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1073 if ( this.drawHiddenChildren(i, selected, labelMode, searchHighlighted) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1074 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1075 i = this.children[i].hiddenEnd;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1076 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1077 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1078 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1079 this.children[i].draw(labelMode, selected, searchHighlighted);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1080 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1081 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1082 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1083 };
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1084
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1085 this.drawHiddenChildren = function
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1086 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1087 firstHiddenChild,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1088 selected,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1089 labelMode,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1090 searchHighlighted
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1091 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1092 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1093 var firstChild = this.children[firstHiddenChild];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1094
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1095 if ( firstChild.hiddenEnd == null || firstChild.radiusInner.current() == 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1096 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1097 return false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1098 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1099
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1100 for ( var i = firstHiddenChild; i < firstChild.hiddenEnd; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1101 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1102 if ( ! this.children[i].hide || ! this.children[i].hidePrev && progress < 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1103 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1104 return false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1105 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1106 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1107
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1108 var angleStart = firstChild.angleStart.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1109 var lastChild = this.children[firstChild.hiddenEnd];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1110 var angleEnd = lastChild.angleEnd.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1111 var radiusInner = gRadius * firstChild.radiusInner.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1112 var hiddenChildren = firstChild.hiddenEnd - firstHiddenChild + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1113
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1114 if ( labelMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1115 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1116 var hiddenSearchResults = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1117
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1118 for ( var i = firstHiddenChild; i <= firstChild.hiddenEnd; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1119 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1120 hiddenSearchResults += this.children[i].searchResults;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1121
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1122 if ( this.children[i].magnitude == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1123 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1124 hiddenChildren--;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1125 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1126 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1127
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1128 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1129 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1130 selected &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1131 (angleEnd - angleStart) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1132 (gRadius + gRadius) >=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1133 minWidth() ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1134 this == highlightedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1135 hiddenChildren ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1136 hiddenSearchResults
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1137 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1138 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1139 context.globalAlpha = this.alphaWedge.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1140
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1141 this.drawHiddenLabel
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1142 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1143 angleStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1144 angleEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1145 hiddenChildren,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1146 hiddenSearchResults
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1147 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1148 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1149 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1150
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1151 var drawWedges = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1152
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1153 for ( var i = firstHiddenChild; i <= firstChild.hiddenEnd; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1154 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1155 // all hidden children must be completely hidden to draw together
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1156
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1157 if ( this.children[i].alphaPattern.current() != this.children[i].alphaWedge.current() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1158 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1159 drawWedges = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1160 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1161 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1162 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1163
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1164 if ( labelMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1165 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1166 if ( drawWedges )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1167 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1168 var drawRadial = (angleEnd < this.angleEnd.current() + rotationOffset);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1169 this.drawLines(angleStart, angleEnd, radiusInner, drawRadial);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1170 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1171
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1172 if ( hiddenSearchResults && ! searchHighlighted )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1173 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1174 drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1175 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1176 angleStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1177 angleEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1178 radiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1179 gRadius,//this.radiusOuter.current() * gRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1180 highlightFill,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1181 0,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1182 true
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1183 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1184 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1185 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1186 else if ( drawWedges )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1187 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1188 context.globalAlpha = this.alphaWedge.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1189
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1190 var fill = rgbText
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1191 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1192 firstChild.r.current(),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1193 firstChild.g.current(),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1194 firstChild.b.current()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1195 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1196
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1197 drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1198 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1199 angleStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1200 angleEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1201 radiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1202 gRadius,//this.radiusOuter.current() * gRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1203 fill,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1204 context.globalAlpha,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1205 false
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1206 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1207 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1208
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1209 return drawWedges;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1210 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1211
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1212 this.drawHiddenLabel = function(angleStart, angleEnd, value, hiddenSearchResults)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1213 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1214 var textAngle = (angleStart + angleEnd) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1215 var labelRadius = gRadius + fontSize;//(radiusInner + radius) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1216
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1217 var hiddenLabel = Array();
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1218
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1219 hiddenLabel.value = value;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1220 hiddenLabel.angle = textAngle;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1221 hiddenLabel.search = hiddenSearchResults;
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1222
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1223 this.hiddenLabels.push(hiddenLabel);
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
1224
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1225 drawTick(gRadius - fontSize * .75, fontSize * 1.5, textAngle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1226 drawTextPolar
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1227 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1228 value.toString() + ' more',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1229 0, // inner text
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1230 textAngle,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1231 labelRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1232 true, // radial
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1233 hiddenSearchResults, // bubble
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1234 this == highlightedNode || this == focusNode, // bold
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1235 false,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1236 hiddenSearchResults
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1237 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1238 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1239
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1240 this.drawHighlight = function(bold)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1241 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1242 var angleStartCurrent = this.angleStart.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1243 var angleEndCurrent = this.angleEnd.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1244 var radiusInner = this.radiusInner.current() * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1245
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1246 //this.setHighlightStyle();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1247
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1248 if ( this == focusNode && this == highlightedNode && this.hasChildren() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1249 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1250 // context.fillStyle = "rgba(255, 255, 255, .3)";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1251 arrow
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1252 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1253 angleStartCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1254 angleEndCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1255 radiusInner
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1256 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1257 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1258 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1259 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1260 drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1261 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1262 angleStartCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1263 angleEndCurrent,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1264 radiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1265 gRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1266 highlightFill,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1267 0,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1268 true
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1269 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1270 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1271
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1272 // check if hidden children should be highlighted
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1273 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1274 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1275 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1276 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1277 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1278 this.children[i].getDepth() - selectedNode.getDepth() + 1 <=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1279 maxDisplayDepth &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1280 this.children[i].hiddenEnd != null
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1281 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1282 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1283 var firstChild = this.children[i];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1284 var lastChild = this.children[firstChild.hiddenEnd];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1285 var hiddenAngleStart = firstChild.angleStart.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1286 var hiddenAngleEnd = lastChild.angleEnd.current() + rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1287 var hiddenRadiusInner = gRadius * firstChild.radiusInner.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1288
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1289 drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1290 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1291 hiddenAngleStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1292 hiddenAngleEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1293 hiddenRadiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1294 gRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1295 'rgba(255, 255, 255, .3)',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1296 0,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1297 true
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1298 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1299
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1300 if ( false && ! this.searchResults )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1301 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1302 this.drawHiddenLabel
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1303 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1304 hiddenAngleStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1305 hiddenAngleEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1306 firstChild.hiddenEnd - i + 1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1307 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1308 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1309
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1310 i = firstChild.hiddenEnd;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1311 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1312 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1313
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1314 // context.strokeStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1315 context.fillStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1316
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1317 var highlight = ! ( progress < 1 && zoomOut && this == selectedNodeLast );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1318
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1319 var angle = (angleEndCurrent + angleStartCurrent) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1320
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1321 if ( ! (this.keyed && showKeys) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1322 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1323 this.drawLabel(angle, true, bold, true, this.radial);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1324 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1325 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1326
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1327 this.drawHighlightCenter = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1328 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1329 if ( ! this.canDisplayHistory() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1330 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1331 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1332 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1333
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1334 context.lineWidth = highlightLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1335 context.strokeStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1336 context.fillStyle = "rgba(255, 255, 255, .6)";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1337
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1338 context.fillStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1339 this.drawLabel(3 * Math.PI / 2, true, true, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1340 context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1341 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1342
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1343 this.drawKey = function(angle, highlight, bold)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1344 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1345 var offset = keyOffset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1346 var color;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1347 var colorText = this.magnitude == 0 ? 'gray' : 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1348 var patternAlpha = this.alphaPattern.end;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1349 var boxLeft = imageWidth - keySize - margin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1350 var textY = offset + keySize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1351
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1352 var label;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1353 var keyNameWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1354
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1355 if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1356 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1357 color = colorUnclassified;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1358 label =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1359 this.getUnclassifiedText() +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1360 ' ' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1361 this.getUnclassifiedPercentage();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1362 keyNameWidth = measureText(label, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1363 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1364 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1365 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1366 label = this.keyLabel;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1367 color = rgbText(this.r.end, this.g.end, this.b.end);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1368
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1369 if ( highlight )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1370 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1371 if ( this.searchResultChildren() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1372 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1373 label = label + searchResultString(this.searchResultChildren());
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1374 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1375
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1376 keyNameWidth = measureText(label, bold);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1377 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1378 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1379 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1380 keyNameWidth = this.keyNameWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1381 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1382 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1383
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1384 var textLeft = boxLeft - keyBuffer - keyNameWidth - fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1385 var labelLeft = textLeft;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1386
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1387 if ( labelLeft > keyMinTextLeft - fontSize / 2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1388 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1389 keyMinTextLeft -= fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1390
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1391 if ( keyMinTextLeft < centerX - gRadius + fontSize / 2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1392 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1393 keyMinTextLeft = centerX - gRadius + fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1394 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1395
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1396 labelLeft = keyMinTextLeft;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1397 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1398
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1399 var lineX = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1400 var lineY = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1401
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1402 var bendRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1403 var keyAngle = Math.atan((textY - centerY) / (labelLeft - centerX));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1404 var arcAngle;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1405
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1406 if ( keyAngle < 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1407 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1408 keyAngle += Math.PI;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1409 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1410
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1411 if ( keyMinAngle == 0 || angle < keyMinAngle )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1412 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1413 keyMinAngle = angle;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1414 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1415
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1416 if ( angle > Math.PI && keyMinAngle > Math.PI )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1417 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1418 // allow lines to come underneath the chart
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1419
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1420 angle -= Math.PI * 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1421 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1422
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1423 lineX.push(Math.cos(angle) * gRadius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1424 lineY.push(Math.sin(angle) * gRadius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1425
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1426 if ( angle < keyAngle && textY > centerY + Math.sin(angle) * (gRadius + buffer * (currentKey - 1) / (keys + 1) / 2 + buffer / 2) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1427 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1428 bendRadius = gRadius + buffer - buffer * currentKey / (keys + 1) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1429 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1430 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1431 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1432 bendRadius = gRadius + buffer * currentKey / (keys + 1) / 2 + buffer / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1433 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1434
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1435 var outside =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1436 Math.sqrt
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1437 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1438 Math.pow(labelLeft - centerX, 2) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1439 Math.pow(textY - centerY, 2)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1440 ) > bendRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1441
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1442 if ( ! outside )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1443 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1444 arcAngle = Math.asin((textY - centerY) / bendRadius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1445
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1446 keyMinTextLeft = min(keyMinTextLeft, centerX + bendRadius * Math.cos(arcAngle) - fontSize / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1447
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1448 if ( labelLeft < textLeft && textLeft > centerX + bendRadius * Math.cos(arcAngle) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1449 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1450 lineX.push(textLeft - centerX);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1451 lineY.push(textY - centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1452 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1453 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1454 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1455 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1456 keyMinTextLeft = min(keyMinTextLeft, labelLeft - fontSize / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1457
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1458 if ( angle < keyAngle )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1459 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1460 // flip everything over y = x
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1461 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1462 arcAngle = Math.PI / 2 - keyLineAngle
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1463 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1464 Math.PI / 2 - angle,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1465 Math.PI / 2 - keyAngle,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1466 bendRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1467 textY - centerY,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1468 labelLeft - centerX,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1469 lineY,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1470 lineX
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1471 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1472
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1473 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1474 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1475 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1476 arcAngle = keyLineAngle
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1477 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1478 angle,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1479 keyAngle,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1480 bendRadius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1481 labelLeft - centerX,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1482 textY - centerY,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1483 lineX,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1484 lineY
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1485 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1486 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1487 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1488
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1489 if ( labelLeft > centerX + bendRadius * Math.cos(arcAngle) ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1490 textY > centerY + bendRadius * Math.sin(arcAngle) + .01)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1491 // if ( outside || )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1492 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1493 lineX.push(labelLeft - centerX);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1494 lineY.push(textY - centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1495
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1496 if ( textLeft != labelLeft )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1497 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1498 lineX.push(textLeft - centerX);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1499 lineY.push(textY - centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1500 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1501 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1502
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1503 context.globalAlpha = this.alphaWedge.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1504
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1505 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1506 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1507 var labelSVG;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1508
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1509 if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1510 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1511 labelSVG =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1512 this.getUnclassifiedText() +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1513 spacer() +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1514 this.getUnclassifiedPercentage();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1515 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1516 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1517 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1518 labelSVG = this.name + spacer() + this.getPercentage() + '%';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1519 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1520
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1521 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1522 '<rect fill="' + color + '" ' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1523 'x="' + boxLeft + '" y="' + offset +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1524 '" width="' + keySize + '" height="' + keySize + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1525
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1526 if ( patternAlpha )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1527 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1528 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1529 '<rect fill="url(#hiddenPattern)" style="stroke:none" ' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1530 'x="' + boxLeft + '" y="' + offset +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1531 '" width="' + keySize + '" height="' + keySize + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1532 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1533
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1534 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1535 '<path class="line' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1536 (highlight ? ' highlight' : '') +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1537 '" d="M ' + (lineX[0] + centerX) + ',' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1538 (lineY[0] + centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1539
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1540 if ( angle != arcAngle )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1541 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1542 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1543 ' L ' + (centerX + bendRadius * Math.cos(angle)) + ',' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1544 (centerY + bendRadius * Math.sin(angle)) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1545 ' A ' + bendRadius + ',' + bendRadius + ' 0 ' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1546 '0,' + (angle > arcAngle ? '0' : '1') + ' ' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1547 (centerX + bendRadius * Math.cos(arcAngle)) + ',' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1548 (centerY + bendRadius * Math.sin(arcAngle));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1549 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1550
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1551 for ( var i = 1; i < lineX.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1552 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1553 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1554 ' L ' + (centerX + lineX[i]) + ',' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1555 (centerY + lineY[i]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1556 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1557
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1558 svg += '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1559
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1560 if ( highlight )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1561 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1562 if ( this.searchResultChildren() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1563 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1564 labelSVG = labelSVG + searchResultString(this.searchResultChildren());
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1565 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1566
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1567 drawBubbleSVG
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1568 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1569 boxLeft - keyBuffer - keyNameWidth - fontSize / 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1570 textY - fontSize,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1571 keyNameWidth + fontSize,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1572 fontSize * 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1573 fontSize,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1574 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1575 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1576
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1577 if ( this.isSearchResult )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1578 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1579 drawSearchHighlights
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1580 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1581 label,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1582 boxLeft - keyBuffer - keyNameWidth,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1583 textY,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1584 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1585 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1586 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1587 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1588
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1589 svg += svgText(labelSVG, boxLeft - keyBuffer, textY, 'end', bold, colorText);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1590 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1591 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1592 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1593 context.fillStyle = color;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1594 context.translate(-centerX, -centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1595 context.strokeStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1596 context.globalAlpha = 1;//this.alphaWedge.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1597
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1598 context.fillRect(boxLeft, offset, keySize, keySize);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1599
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1600 if ( patternAlpha )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1601 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1602 context.globalAlpha = patternAlpha;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1603 context.fillStyle = hiddenPattern;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1604
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1605 // make clipping box for Firefox performance
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1606 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1607 context.moveTo(boxLeft, offset);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1608 context.lineTo(boxLeft + keySize, offset);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1609 context.lineTo(boxLeft + keySize, offset + keySize);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1610 context.lineTo(boxLeft, offset + keySize);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1611 context.closePath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1612 context.save();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1613 context.clip();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1614
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1615 context.fillRect(boxLeft, offset, keySize, keySize);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1616 context.fillRect(boxLeft, offset, keySize, keySize);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1617
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1618 context.restore(); // remove clipping region
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1619 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1620
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1621 if ( highlight )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1622 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1623 this.setHighlightStyle();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1624 context.fillRect(boxLeft, offset, keySize, keySize);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1625 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1626 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1627 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1628 context.lineWidth = thinLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1629 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1630
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1631 context.strokeRect(boxLeft, offset, keySize, keySize);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1632
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1633 if ( lineX.length )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1634 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1635 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1636 context.moveTo(lineX[0] + centerX, lineY[0] + centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1637
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1638 context.arc(centerX, centerY, bendRadius, angle, arcAngle, angle > arcAngle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1639
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1640 for ( var i = 1; i < lineX.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1641 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1642 context.lineTo(lineX[i] + centerX, lineY[i] + centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1643 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1644
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1645 context.globalAlpha = this == selectedNode ?
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1646 this.children[0].alphaWedge.current() :
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1647 this.alphaWedge.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1648 context.lineWidth = highlight ? highlightLineWidth : thinLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1649 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1650 context.globalAlpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1651 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1652
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1653 if ( highlight )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1654 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1655 drawBubbleCanvas
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1656 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1657 boxLeft - keyBuffer - keyNameWidth - fontSize / 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1658 textY - fontSize,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1659 keyNameWidth + fontSize,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1660 fontSize * 2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1661 fontSize,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1662 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1663 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1664
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1665 if ( this.isSearchResult )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1666 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1667 drawSearchHighlights
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1668 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1669 label,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1670 boxLeft - keyBuffer - keyNameWidth,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1671 textY,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1672 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1673 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1674 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1675 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1676
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1677 drawText(label, boxLeft - keyBuffer, offset + keySize / 2, 0, 'end', bold, colorText);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1678
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1679 context.translate(centerX, centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1680 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1681
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1682 currentKey++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1683 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1684
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1685 this.drawLabel = function(angle, bubble, bold, selected, radial)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1686 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1687 if ( context.globalAlpha == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1688 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1689 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1690 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1691
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1692 var innerText;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1693 var label;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1694 var radius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1695
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1696 if ( radial )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1697 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1698 radius = (this.radiusInner.current() + 1) * gRadius / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1699 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1700 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1701 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1702 radius = this.labelRadius.current() * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1703 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1704
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1705 if ( radial && (selected || bubble ) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1706 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1707 var percentage = this.getPercentage();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1708 innerText = percentage + '%';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1709 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1710
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1711 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1712 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1713 ! radial &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1714 this != selectedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1715 ! bubble &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1716 ( !zoomOut || this != selectedNodeLast)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1717 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1718 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1719 label = this.shortenLabel();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1720 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1721 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1722 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1723 label = this.name;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1724 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1725
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1726 var flipped = drawTextPolar
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1727 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1728 label,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1729 innerText,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1730 angle,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1731 radius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1732 radial,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1733 bubble,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1734 bold,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1735 // this.isSearchResult && this.shouldAddSearchResultsString() && (!selected || this == selectedNode || highlight),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1736 this.isSearchResult && (!selected || this == selectedNode || bubble),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1737 (this.hideAlone || !selected || this == selectedNode ) ? this.searchResultChildren() : 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1738 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1739
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1740 var depth = this.getDepth() - selectedNode.getDepth() + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1741
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1742 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1743 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1744 ! radial &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1745 ! bubble &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1746 this != selectedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1747 this.angleEnd.end != this.angleStart.end &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1748 nLabelOffsets[depth - 2] > 2 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1749 this.labelWidth.current() > (this.angleEnd.end - this.angleStart.end) * Math.abs(radius) &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1750 ! ( zoomOut && this == selectedNodeLast ) &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1751 this.labelRadius.end > 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1752 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1753 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1754 // name extends beyond wedge; draw tick mark towards the central
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1755 // radius for easier identification
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1756
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1757 var radiusCenter = compress ?
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1758 (compressedRadii[depth - 1] + compressedRadii[depth - 2]) / 2 :
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1759 (depth - .5) * nodeRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1760
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1761 if ( this.labelRadius.end > radiusCenter )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1762 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1763 if ( flipped )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1764 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1765 drawTick(radius - tickLength * 1.4 , tickLength, angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1766 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1767 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1768 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1769 drawTick(radius - tickLength * 1.7, tickLength, angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1770 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1771 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1772 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1773 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1774 if ( flipped )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1775 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1776 drawTick(radius + tickLength * .7, tickLength, angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1777 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1778 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1779 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1780 drawTick(radius + tickLength * .4, tickLength, angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1781 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1782 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1783 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1784 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1785
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1786 this.drawLines = function(angleStart, angleEnd, radiusInner, drawRadial, selected)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1787 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1788 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1789 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1790 if ( this != selectedNode)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1791 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1792 if ( angleEnd == angleStart + Math.PI * 2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1793 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1794 // fudge to prevent overlap, which causes arc ambiguity
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1795 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1796 angleEnd -= .1 / gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1797 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1798
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1799 var longArc = angleEnd - angleStart > Math.PI ? 1 : 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1800
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1801 var x1 = centerX + radiusInner * Math.cos(angleStart);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1802 var y1 = centerY + radiusInner * Math.sin(angleStart);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1803
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1804 var x2 = centerX + gRadius * Math.cos(angleStart);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1805 var y2 = centerY + gRadius * Math.sin(angleStart);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1806
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1807 var x3 = centerX + gRadius * Math.cos(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1808 var y3 = centerY + gRadius * Math.sin(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1809
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1810 var x4 = centerX + radiusInner * Math.cos(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1811 var y4 = centerY + radiusInner * Math.sin(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1812
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1813 if ( this.alphaArc.end )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1814 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1815 var dArray =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1816 [
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1817 " M ", x4, ",", y4,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1818 " A ", radiusInner, ",", radiusInner, " 0 ", longArc,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1819 " 0 ", x1, ",", y1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1820 ];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1821
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1822 svg += '<path class="line" d="' + dArray.join('') + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1823 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1824
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1825 if ( drawRadial && this.alphaLine.end )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1826 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1827 svg += '<line x1="' + x3 + '" y1="' + y3 + '" x2="' + x4 + '" y2="' + y4 + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1828 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1829 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1830 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1831 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1832 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1833 context.lineWidth = thinLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1834 context.strokeStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1835 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1836 context.arc(0, 0, radiusInner, angleStart, angleEnd, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1837 context.globalAlpha = this.alphaArc.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1838 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1839
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1840 if ( drawRadial )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1841 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1842 var x1 = radiusInner * Math.cos(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1843 var y1 = radiusInner * Math.sin(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1844 var x2 = gRadius * Math.cos(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1845 var y2 = gRadius * Math.sin(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1846
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1847 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1848 context.moveTo(x1, y1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1849 context.lineTo(x2, y2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1850
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1851 // if ( this.getCollapse() )//( selected && this != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1852 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1853 context.globalAlpha = this.alphaLine.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1854 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1855
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1856 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1857 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1858 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1859 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1860
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1861 this.drawMap = function(child)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1862 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1863 if ( this.parent )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1864 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1865 this.parent.drawMap(child);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1866 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1867
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1868 if ( this.getCollapse() && this != child || this == focusNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1869 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1870 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1871 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1872
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1873 var angleStart =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1874 (child.baseMagnitude - this.baseMagnitude) / this.magnitude * Math.PI * 2 +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1875 rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1876 var angleEnd =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1877 (child.baseMagnitude - this.baseMagnitude + child.magnitude) /
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1878 this.magnitude * Math.PI * 2 +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1879 rotationOffset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1880
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1881 var box = this.getMapPosition();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1882
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1883 context.save();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1884 context.fillStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1885 context.textAlign = 'end';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1886 context.textBaseline = 'middle';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1887
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1888 var textX = box.x - mapRadius - mapBuffer;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1889 var percentage = getPercentage(child.magnitude / this.magnitude);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1890
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1891 var highlight = this == selectedNode || this == highlightedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1892
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1893 if ( highlight )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1894 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1895 context.font = fontBold;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1896 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1897 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1898 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1899 context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1900 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1901
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1902 context.fillText(percentage + '% of', textX, box.y - mapRadius / 3);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1903 context.fillText(this.name, textX, box.y + mapRadius / 3);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1904
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1905 if ( highlight )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1906 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1907 context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1908 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1909
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1910 if ( this == highlightedNode && this != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1911 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1912 context.fillStyle = 'rgb(245, 245, 245)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1913 // context.fillStyle = 'rgb(200, 200, 200)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1914 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1915 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1916 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1917 context.fillStyle = 'rgb(255, 255, 255)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1918 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1919
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1920 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1921 context.arc(box.x, box.y, mapRadius, 0, Math.PI * 2, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1922 context.closePath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1923 context.fill();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1924
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1925 if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1926 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1927 context.lineWidth = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1928 context.fillStyle = 'rgb(100, 100, 100)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1929 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1930 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1931 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1932 if ( this == highlightedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1933 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1934 context.lineWidth = .2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1935 context.fillStyle = 'rgb(190, 190, 190)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1936 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1937 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1938 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1939 context.lineWidth = .2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1940 context.fillStyle = 'rgb(200, 200, 200)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1941 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1942 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1943
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1944 var maxDepth = this.getMaxDepth();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1945
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1946 if ( ! compress && maxDepth > maxPossibleDepth + this.getDepth() - 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1947 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1948 maxDepth = maxPossibleDepth + this.getDepth() - 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1949 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1950
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1951 if ( this.getDepth() < selectedNode.getDepth() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1952 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1953 if ( child.getDepth() - 1 >= maxDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1954 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1955 maxDepth = child.getDepth();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1956 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1957 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1958
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1959 var radiusInner;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1960
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1961 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1962 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1963 radiusInner = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1964 // Math.atan(child.getDepth() - this.getDepth()) /
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1965 // Math.PI * 2 * .9;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1966 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1967 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1968 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1969 radiusInner =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1970 (child.getDepth() - this.getDepth()) /
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1971 (maxDepth - this.getDepth() + 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1972 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1973
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1974 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1975 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1976
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1977 if ( radiusInner == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1978 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1979 context.moveTo(box.x, box.y);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1980 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1981 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1982 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1983 context.arc(box.x, box.y, mapRadius * radiusInner, angleEnd, angleStart, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1984 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1985
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1986 context.arc(box.x, box.y, mapRadius, angleStart, angleEnd, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1987 context.closePath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1988 context.fill();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1989
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1990 if ( this == highlightedNode && this != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1991 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1992 context.lineWidth = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1993 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1994 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1995
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1996 context.restore();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1997 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1998
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
1999 this.drawReferenceRings = function(childRadiusInner)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2000 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2001 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2002 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2003 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2004 '<circle cx="' + centerX + '" cy="' + centerY +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2005 '" r="' + childRadiusInner + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2006 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2007 '<circle cx="' + centerX + '" cy="' + centerY +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2008 '" r="' + gRadius + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2009 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2010 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2011 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2012 context.globalAlpha = 1 - this.alphaLine.current();//this.getUncollapsed().alphaLine.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2013 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2014 context.arc(0, 0, childRadiusInner, 0, Math.PI * 2, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2015 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2016 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2017 context.arc(0, 0, gRadius, 0, Math.PI * 2, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2018 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2019 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2020 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2021
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2022 this.getCollapse = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2023 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2024 return (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2025 collapse &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2026 this.collapse &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2027 this.depth != maxAbsoluteDepth
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2028 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2029 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2030
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2031 this.getDepth = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2032 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2033 if ( collapse )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2034 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2035 return this.depthCollapsed;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2036 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2037 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2038 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2039 return this.depth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2040 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2041 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2042
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2043 this.getMagnitude = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2044 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2045 return this.attributes[magnitudeIndex][currentDataset];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2046 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2047
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2048 this.getMapPosition = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2049 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2050 return {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2051 x : (details.offsetLeft + details.clientWidth - mapRadius),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2052 y : ((focusNode.getDepth() - this.getDepth()) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2053 (mapBuffer + mapRadius * 2) - mapRadius) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2054 details.clientHeight + details.offsetTop
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2055 };
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2056 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2057
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2058 this.getMaxDepth = function(limit)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2059 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2060 var max;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2061
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2062 if ( collapse )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2063 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2064 return this.maxDepthCollapsed;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2065 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2066 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2067 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2068 if ( this.maxDepth > maxAbsoluteDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2069 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2070 return maxAbsoluteDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2071 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2072 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2073 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2074 return this.maxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2075 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2076 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2077 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2078
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2079 this.getData = function(index, summary)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2080 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2081 var files = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2082
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2083 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2084 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2085 this.attributes[index] != null &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2086 this.attributes[index][currentDataset] != null &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2087 this.attributes[index][currentDataset] != ''
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2088 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2089 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2090 files.push
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2091 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2092 document.location +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2093 '.files/' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2094 this.attributes[index][currentDataset]
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2095 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2096 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2097
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2098 if ( summary )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2099 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2100 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2101 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2102 files = files.concat(this.children[i].getData(index, true));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2103 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2104 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2105
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2106 return files;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2107 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2108
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2109 this.getList = function(index, summary)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2110 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2111 var list;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2112
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2113 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2114 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2115 this.attributes[index] != null &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2116 this.attributes[index][currentDataset] != null
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2117 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2118 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2119 list = this.attributes[index][currentDataset];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2120 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2121 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2122 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2123 list = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2124 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2125
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2126 if ( summary )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2127 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2128 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2129 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2130 list = list.concat(this.children[i].getList(index, true));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2131 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2132 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2133
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2134 return list;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2135 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2136
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2137 this.getParent = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2138 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2139 // returns parent, accounting for collapsing or 0 if doesn't exist
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2140
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2141 var parent = this.parent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2142
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2143 while ( parent != 0 && parent.getCollapse() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2144 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2145 parent = parent.parent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2146 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2147
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2148 return parent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2149 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2150
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2151 this.getPercentage = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2152 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2153 return getPercentage(this.magnitude / selectedNode.magnitude);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2154 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2155
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2156 this.getUnclassifiedPercentage = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2157 {
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2158 if ( this.children.length )
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2159 {
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2160 var lastChild = this.children[this.children.length - 1];
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2161
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2162 return getPercentage
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2163 (
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2164 (
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2165 this.baseMagnitude +
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2166 this.magnitude -
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2167 lastChild.magnitude -
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2168 lastChild.baseMagnitude
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2169 ) / this.magnitude
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2170 ) + '%';
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2171 }
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2172 else
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2173 {
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2174 return '100%';
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2175 }
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2176 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2177
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2178 this.getUnclassifiedText = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2179 {
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
2180 return '[other '+ this.name + ']';
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2181 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2182
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2183 this.getUncollapsed = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2184 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2185 // recurse through collapsed children until uncollapsed node is found
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2186
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2187 if ( this.getCollapse() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2188 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2189 return this.children[0].getUncollapsed();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2190 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2191 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2192 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2193 return this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2194 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2195 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2196
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2197 this.hasChildren = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2198 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2199 return this.children.length && this.depth < maxAbsoluteDepth && this.magnitude;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2200 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2201
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2202 this.hasParent = function(parent)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2203 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2204 if ( this.parent )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2205 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2206 if ( this.parent == parent )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2207 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2208 return true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2209 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2210 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2211 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2212 return this.parent.hasParent(parent);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2213 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2214 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2215 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2216 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2217 return false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2218 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2219 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2220
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2221 this.maxVisibleDepth = function(maxDepth)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2222 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2223 var childInnerRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2224 var depth = this.getDepth() - selectedNode.getDepth() + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2225 var currentMaxDepth = depth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2226
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2227 if ( this.hasChildren() && depth < maxDepth)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2228 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2229 var lastChild = this.children[this.children.length - 1];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2230
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2231 if ( this.name == 'Pseudomonadaceae' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2232 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2233 var x = 3;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2234 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2235
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2236 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2237 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2238 lastChild.baseMagnitude + lastChild.magnitude <
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2239 this.baseMagnitude + this.magnitude
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2240 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2241 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2242 currentMaxDepth++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2243 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2244
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2245 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2246 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2247 childInnerRadius = compressedRadii[depth - 1];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2248 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2249 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2250 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2251 childInnerRadius = (depth) / maxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2252 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2253
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2254 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2255 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2256 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2257 (//true ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2258 this.children[i].magnitude *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2259 angleFactor *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2260 (childInnerRadius + 1) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2261 gRadius >=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2262 minWidth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2263 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2264 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2265 var childMaxDepth = this.children[i].maxVisibleDepth(maxDepth);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2266
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2267 if ( childMaxDepth > currentMaxDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2268 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2269 currentMaxDepth = childMaxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2270 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2271 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2272 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2273 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2274
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2275 return currentMaxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2276 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2277
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2278 this.resetLabelWidth = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2279 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2280 var nameWidthOld = this.nameWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2281
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
2282 if ( true || ! this.radial )//&& fontSize != fontSizeLast )
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2283 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2284 var dim = context.measureText(this.name);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2285 this.nameWidth = dim.width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2286 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2287
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2288 if ( fontSize != fontSizeLast && this.labelWidth.end == nameWidthOld * labelWidthFudge )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2289 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2290 // font size changed; adjust start of tween to match
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2291
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2292 this.labelWidth.start = this.nameWidth * labelWidthFudge;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2293 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2294 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2295 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2296 this.labelWidth.start = this.labelWidth.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2297 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2298
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2299 this.labelWidth.end = this.nameWidth * labelWidthFudge;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2300 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2301
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2302 this.restrictLabelWidth = function(width)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2303 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2304 if ( width < this.labelWidth.end )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2305 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2306 this.labelWidth.end = width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2307 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2308 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2309
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2310 this.search = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2311 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2312 this.isSearchResult = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2313 this.searchResults = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2314
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2315 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2316 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2317 ! this.getCollapse() &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2318 search.value != '' &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2319 this.name.toLowerCase().indexOf(search.value.toLowerCase()) != -1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2320 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2321 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2322 this.isSearchResult = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2323 this.searchResults = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2324 nSearchResults++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2325 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2326
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2327 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2328 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2329 this.searchResults += this.children[i].search();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2330 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2331
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2332 return this.searchResults;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2333 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2334
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2335 this.searchResultChildren = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2336 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2337 if ( this.isSearchResult )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2338 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2339 return this.searchResults - 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2340 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2341 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2342 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2343 return this.searchResults;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2344 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2345 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2346
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2347 this.setDepth = function(depth, depthCollapsed)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2348 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2349 this.depth = depth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2350 this.depthCollapsed = depthCollapsed;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2351
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2352 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2353 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2354 this.children.length == 1 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2355 // this.magnitude > 0 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2356 this.children[0].magnitude == this.magnitude &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2357 ( head.children.length > 1 || this.children[0].children.length )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2358 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2359 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2360 this.collapse = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2361 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2362 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2363 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2364 this.collapse = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2365 depthCollapsed++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2366 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2367
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2368 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2369 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2370 this.children[i].setDepth(depth + 1, depthCollapsed);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2371 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2372 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2373
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2374 this.setHighlightStyle = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2375 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2376 context.lineWidth = highlightLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2377
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2378 if ( this.hasChildren() || this != focusNode || this != highlightedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2379 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2380 context.strokeStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2381 context.fillStyle = "rgba(255, 255, 255, .3)";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2382 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2383 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2384 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2385 context.strokeStyle = 'rgb(90,90,90)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2386 context.fillStyle = "rgba(155, 155, 155, .3)";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2387 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2388 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2389
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2390 this.setLabelWidth = function(node)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2391 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2392 if ( ! shorten || this.radial )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2393 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2394 return; // don't need to set width
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2395 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2396
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2397 if ( node.hide )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2398 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2399 alert('wtf');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2400 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2401 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2402
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2403 var angle = (this.angleStart.end + this.angleEnd.end) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2404 var a; // angle difference
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2405
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2406 if ( node == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2407 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2408 a = Math.abs(angle - node.angleOther);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2409 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2410 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2411 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2412 a = Math.abs(angle - (node.angleStart.end + node.angleEnd.end) / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2413 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2414
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2415 if ( a == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2416 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2417 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2418 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2419
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2420 if ( a > Math.PI )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2421 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2422 a = 2 * Math.PI - a;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2423 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2424
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2425 if ( node.radial || node == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2426 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2427 var nodeLabelRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2428
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2429 if ( node == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2430 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2431 // radial 'other' label
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2432
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2433 nodeLabelRadius = (node.children[0].radiusInner.end + 1) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2434 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2435 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2436 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2437 nodeLabelRadius = (node.radiusInner.end + 1) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2438 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2439
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2440 if ( a < Math.PI / 2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2441 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2442 var r = this.labelRadius.end * gRadius + .5 * fontSize
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2443 var hypotenuse = r / Math.cos(a);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2444 var opposite = r * Math.tan(a);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2445 var fontRadius = .8 * fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2446
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2447 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2448 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2449 nodeLabelRadius * gRadius < hypotenuse &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2450 this.labelWidth.end / 2 + fontRadius > opposite
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2451 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2452 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2453 this.labelWidth.end = 2 * (opposite - fontRadius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2454 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2455 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2456 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2457 else if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2458 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2459 this.labelRadius.end == node.labelRadius.end &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2460 a < Math.PI / 4
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2461 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2462 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2463 // same radius with small angle; use circumferential approximation
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2464
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2465 var dist = a * this.labelRadius.end * gRadius - fontSize * (1 - a * 4 / Math.PI) * 1.3;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2466
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2467 if ( this.labelWidth.end < dist )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2468 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2469 node.restrictLabelWidth((dist - this.labelWidth.end / 2) * 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2470 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2471 else if ( node.labelWidth.end < dist )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2472 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2473 this.restrictLabelWidth((dist - node.labelWidth.end / 2) * 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2474 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2475 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2476 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2477 // both labels reach halfway point; restrict both
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2478
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2479 this.labelWidth.end = dist;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2480 node.labelWidth.end = dist
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2481 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2482 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2483 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2484 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2485 var r1 = this.labelRadius.end * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2486 var r2 = node.labelRadius.end * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2487
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2488 // first adjust the radii to account for the height of the font by shifting them
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2489 // toward each other
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2490 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2491 var fontFudge = .35 * fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2492 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2493 if ( this.labelRadius.end < node.labelRadius.end )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2494 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2495 r1 += fontFudge;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2496 r2 -= fontFudge;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2497 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2498 else if ( this.labelRadius.end > node.labelRadius.end )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2499 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2500 r1 -= fontFudge;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2501 r2 += fontFudge;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2502 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2503 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2504 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2505 r1 -= fontFudge;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2506 r2 -= fontFudge;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2507 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2508
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2509 var r1s = r1 * r1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2510 var r2s = r2 * r2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2511
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2512 // distance between the centers of the two labels
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2513 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2514 var dist = Math.sqrt(r1s + r2s - 2 * r1 * r2 * Math.cos(a));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2515
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2516 // angle at our label center between our radius and the line to the other label center
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2517 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2518 var b = Math.acos((r1s + dist * dist - r2s) / (2 * r1 * dist));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2519
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2520 // distance from our label center to the intersection of the two tangents
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2521 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2522 var l1 = Math.sin(a + b - Math.PI / 2) * dist / Math.sin(Math.PI - a);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2523
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2524 // distance from other label center the the intersection of the two tangents
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2525 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2526 var l2 = Math.sin(Math.PI / 2 - b) * dist / Math.sin(Math.PI - a);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2527
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2528 l1 = Math.abs(l1) - .4 * fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2529 l2 = Math.abs(l2) - .4 * fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2530 /*
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2531 // amount to shorten the distances because of the height of the font
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2532 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2533 var l3 = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2534 var fontRadius = fontSize * .55;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2535 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2536 if ( l1 < 0 || l2 < 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2537 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2538 var l4 = fontRadius / Math.tan(a);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2539 l1 = Math.abs(l1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2540 l2 = Math.abs(l2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2541
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2542 l1 -= l4;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2543 l2 -= l4;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2544 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2545 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2546 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2547 var c = Math.PI - a;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2548
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2549 l3 = fontRadius * Math.tan(c / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2550 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2551 */
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2552 if ( this.labelWidth.end / 2 > l1 && node.labelWidth.end / 2 > l2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2553 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2554 // shorten the farthest one from the intersection
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2555
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2556 if ( l1 > l2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2557 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2558 this.restrictLabelWidth(2 * (l1));// - l3 - fontRadius));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2559 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2560 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2561 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2562 node.restrictLabelWidth(2 * (l2));// - l3 - fontRadius));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2563 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2564 }/*
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2565 else if ( this.labelWidth.end / 2 > l1 + l3 && node.labelWidth.end / 2 > l2 - l3 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2566 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2567 node.restrictLabelWidth(2 * (l2 - l3));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2568 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2569 else if ( this.labelWidth.end / 2 > l1 - l3 && node.labelWidth.end / 2 > l2 + l3 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2570 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2571 this.restrictLabelWidth(2 * (l1 - l3));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2572 }*/
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2573 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2574 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2575
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2576 this.setMagnitudes = function(baseMagnitude)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2577 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2578 this.magnitude = this.getMagnitude();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2579 this.baseMagnitude = baseMagnitude;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2580
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2581 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2582 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2583 this.children[i].setMagnitudes(baseMagnitude);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2584 baseMagnitude += this.children[i].magnitude;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2585 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2586
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2587 this.maxChildMagnitude = baseMagnitude;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2588 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2589
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2590 this.setMaxDepths = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2591 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2592 this.maxDepth = this.depth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2593 this.maxDepthCollapsed = this.depthCollapsed;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2594
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2595 for ( i in this.children )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2596 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2597 var child = this.children[i];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2598
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2599 child.setMaxDepths();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2600
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2601 if ( child.maxDepth > this.maxDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2602 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2603 this.maxDepth = child.maxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2604 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2605
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2606 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2607 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2608 child.maxDepthCollapsed > this.maxDepthCollapsed &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2609 (child.depth <= maxAbsoluteDepth || maxAbsoluteDepth == 0)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2610 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2611 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2612 this.maxDepthCollapsed = child.maxDepthCollapsed;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2613 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2614 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2615 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2616
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2617 this.setTargetLabelRadius = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2618 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2619 var depth = this.getDepth() - selectedNode.getDepth() + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2620 var index = depth - 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2621 var labelOffset = labelOffsets[index];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2622
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2623 if ( this.radial )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2624 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2625 //this.labelRadius.setTarget((this.radiusInner.end + 1) / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2626 var max =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2627 depth == maxDisplayDepth ?
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2628 1 :
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2629 compressedRadii[index + 1];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2630
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2631 this.labelRadius.setTarget((compressedRadii[index] + max) / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2632 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2633 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2634 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2635 var radiusCenter;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2636 var width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2637
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2638 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2639 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2640 if ( nLabelOffsets[index] > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2641 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2642 this.labelRadius.setTarget
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2643 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2644 lerp
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2645 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2646 labelOffset + .75,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2647 0,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2648 nLabelOffsets[index] + .5,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2649 compressedRadii[index],
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2650 compressedRadii[index + 1]
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2651 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2652 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2653 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2654 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2655 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2656 this.labelRadius.setTarget((compressedRadii[index] + compressedRadii[index + 1]) / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2657 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2658 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2659 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2660 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2661 radiusCenter =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2662 nodeRadius * (depth - 1) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2663 nodeRadius / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2664 width = nodeRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2665
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2666 this.labelRadius.setTarget
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2667 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2668 radiusCenter + width * ((labelOffset + 1) / (nLabelOffsets[index] + 1) - .5)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2669 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2670 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2671 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2672
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2673 if ( ! this.hide && ! this.keyed && nLabelOffsets[index] )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2674 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2675 // check last and first labels in each track for overlap
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2676
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2677 for ( var i = 0; i < maxDisplayDepth - 1; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2678 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2679 for ( var j = 0; j <= nLabelOffsets[i]; j++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2680 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2681 var last = labelLastNodes[i][j];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2682 var first = labelFirstNodes[i][j];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2683
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2684 if ( last )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2685 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2686 if ( j == nLabelOffsets[i] )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2687 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2688 // last is radial
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2689 this.setLabelWidth(last);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2690 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2691 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2692 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2693 last.setLabelWidth(this);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2694 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2695 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2696
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2697 if ( first )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2698 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2699 if ( j == nLabelOffsets[i] )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2700 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2701 this.setLabelWidth(first);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2702 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2703 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2704 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2705 first.setLabelWidth(this);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2706 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2707 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2708 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2709 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2710
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2711 if ( selectedNode.canDisplayLabelOther )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2712 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2713 this.setLabelWidth(selectedNode); // in case there is an 'other' label
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2714 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2715
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2716 if ( this.radial )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2717 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2718 // use the last 'track' of this depth for radial
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2719
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2720 labelLastNodes[index][nLabelOffsets[index]] = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2721
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2722 if ( labelFirstNodes[index][nLabelOffsets[index]] == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2723 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2724 labelFirstNodes[index][nLabelOffsets[index]] = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2725 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2726 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2727 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2728 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2729 labelLastNodes[index][labelOffset] = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2730
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2731 // update offset
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2732
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2733 labelOffsets[index] += 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2734
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2735 if ( labelOffsets[index] > nLabelOffsets[index] )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2736 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2737 labelOffsets[index] -= nLabelOffsets[index];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2738
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2739 if ( !(nLabelOffsets[index] & 1) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2740 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2741 labelOffsets[index]--;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2742 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2743 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2744 else if ( labelOffsets[index] == nLabelOffsets[index] )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2745 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2746 labelOffsets[index] -= nLabelOffsets[index];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2747
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2748 if ( false && !(nLabelOffsets[index] & 1) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2749 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2750 labelOffsets[index]++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2751 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2752 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2753
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2754 if ( labelFirstNodes[index][labelOffset] == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2755 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2756 labelFirstNodes[index][labelOffset] = this;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2757 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2758 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2759 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2760 else if ( this.hide )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2761 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2762 this.labelWidth.end = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2763 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2764 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2765
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2766 this.setTargets = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2767 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2768 if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2769 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2770 this.setTargetsSelected
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2771 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2772 0,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2773 1,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2774 lightnessBase,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2775 false,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2776 false
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2777 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2778 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2779 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2780
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2781 var depthRelative = this.getDepth() - selectedNode.getDepth();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2782
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2783 var parentOfSelected = selectedNode.hasParent(this);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2784 /* (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2785 // ! this.getCollapse() &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2786 this.baseMagnitude <= selectedNode.baseMagnitude &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2787 this.baseMagnitude + this.magnitude >=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2788 selectedNode.baseMagnitude + selectedNode.magnitude
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2789 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2790 */
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2791 if ( parentOfSelected )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2792 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2793 this.resetLabelWidth();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2794 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2795 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2796 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2797 //context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2798 var dim = context.measureText(this.name);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2799 this.nameWidth = dim.width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2800 //this.labelWidth.setTarget(this.labelWidth.end);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2801 this.labelWidth.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2802 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2803
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2804 // set angles
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2805 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2806 if ( this.baseMagnitude <= selectedNode.baseMagnitude )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2807 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2808 this.angleStart.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2809 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2810 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2811 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2812 this.angleStart.setTarget(Math.PI * 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2813 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2814 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2815 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2816 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2817 parentOfSelected ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2818 this.baseMagnitude + this.magnitude >=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2819 selectedNode.baseMagnitude + selectedNode.magnitude
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2820 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2821 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2822 this.angleEnd.setTarget(Math.PI * 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2823 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2824 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2825 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2826 this.angleEnd.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2827 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2828
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2829 // children
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2830 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2831 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2832 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2833 this.children[i].setTargets();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2834 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2835
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2836 if ( this.getDepth() <= selectedNode.getDepth() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2837 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2838 // collapse in
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2839
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2840 this.radiusInner.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2841
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2842 if ( parentOfSelected )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2843 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2844 this.labelRadius.setTarget
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2845 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2846 (depthRelative) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2847 historySpacingFactor * fontSize / gRadius
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2848 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2849 //this.scale.setTarget(1 - (selectedNode.getDepth() - this.getDepth()) / 18); // TEMP
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2850 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2851 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2852 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2853 this.labelRadius.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2854 //this.scale.setTarget(1); // TEMP
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2855 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2856 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2857 else if ( depthRelative + 1 > maxDisplayDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2858 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2859 // collapse out
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2860
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2861 this.radiusInner.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2862 this.labelRadius.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2863 //this.scale.setTarget(1); // TEMP
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2864 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2865 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2866 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2867 // don't collapse
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2868
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2869 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2870 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2871 this.radiusInner.setTarget(compressedRadii[depthRelative - 1]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2872 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2873 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2874 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2875 this.radiusInner.setTarget(nodeRadius * (depthRelative));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2876 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2877
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2878 //this.scale.setTarget(1); // TEMP
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2879
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2880 if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2881 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2882 this.labelRadius.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2883 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2884 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2885 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2886 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2887 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2888 this.labelRadius.setTarget
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2889 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2890 (compressedRadii[depthRelative - 1] + compressedRadii[depthRelative]) / 2
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2891 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2892 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2893 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2894 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2895 this.labelRadius.setTarget(nodeRadius * (depthRelative) + nodeRadius / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2896 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2897 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2898 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2899
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2900 // this.r.start = this.r.end;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2901 // this.g.start = this.g.end;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2902 // this.b.start = this.b.end;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2903
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2904 this.r.setTarget(255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2905 this.g.setTarget(255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2906 this.b.setTarget(255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2907
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2908 this.alphaLine.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2909 this.alphaArc.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2910 this.alphaWedge.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2911 this.alphaPattern.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2912 this.alphaOther.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2913
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2914 if ( parentOfSelected && ! this.getCollapse() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2915 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2916 var alpha =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2917 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2918 1 -
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2919 (selectedNode.getDepth() - this.getDepth()) /
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2920 (Math.floor((compress ? compressedRadii[0] : nodeRadius) * gRadius / (historySpacingFactor * fontSize) - .5) + 1)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2921 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2922
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2923 if ( alpha < 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2924 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2925 alpha = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2926 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2927
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2928 this.alphaLabel.setTarget(alpha);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2929 this.radial = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2930 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2931 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2932 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2933 this.alphaLabel.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2934 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2935
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2936 this.hideAlonePrev = this.hideAlone;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2937 this.hidePrev = this.hide;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2938
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2939 if ( parentOfSelected )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2940 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2941 this.hideAlone = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2942 this.hide = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2943 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2944
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2945 if ( this.getParent() == selectedNode.getParent() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2946 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2947 this.hiddenEnd = null;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2948 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2949
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2950 this.radialPrev = this.radial;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2951 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2952
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2953 this.setTargetsSelected = function(hueMin, hueMax, lightness, hide, nextSiblingHidden)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2954 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2955 var collapse = this.getCollapse();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2956 var depth = this.getDepth() - selectedNode.getDepth() + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2957 var canDisplayChildLabels = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2958 var lastChild;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2959
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2960 if ( this.hasChildren() )//&& ! hide )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2961 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2962 lastChild = this.children[this.children.length - 1];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2963 this.hideAlone = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2964 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2965 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2966 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2967 this.hideAlone = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2968 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2969
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2970 // set child wedges
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2971 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2972 for ( var i = 0; i < this.children.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2973 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2974 this.children[i].setTargetWedge();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2975
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2976 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2977 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2978 ! this.children[i].hide &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2979 ( collapse || depth < maxDisplayDepth ) &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2980 this.depth < maxAbsoluteDepth
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2981 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2982 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2983 canDisplayChildLabels = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2984 this.hideAlone = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2985 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2986 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2987
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2988 if ( this == selectedNode || lastChild && lastChild.angleEnd.end < this.angleEnd.end - .01)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2989 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2990 this.hideAlone = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2991 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2992
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2993 if ( this.hideAlonePrev == undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2994 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2995 this.hideAlonePrev = this.hideAlone;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2996 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2997
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2998 if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
2999 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3000 var otherArc =
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3001 this.children.length ?
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3002 angleFactor *
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3003 (
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3004 this.baseMagnitude + this.magnitude -
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3005 lastChild.baseMagnitude - lastChild.magnitude
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3006 )
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3007 : this.baseMagnitude + this.magnitude;
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3008 this.canDisplayLabelOther =
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3009 this.children.length ?
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3010 otherArc *
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3011 (this.children[0].radiusInner.end + 1) * gRadius >=
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3012 minWidth()
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3013 : true;
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3014
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3015 this.keyUnclassified = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3016
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3017 if ( this.canDisplayLabelOther )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3018 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3019 this.angleOther = Math.PI * 2 - otherArc / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3020 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3021 else if ( otherArc > 0.0000000001 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3022 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3023 this.keyUnclassified = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3024 keys++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3025 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3026
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3027 this.angleStart.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3028 this.angleEnd.setTarget(Math.PI * 2);
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3029
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3030 if ( this.children.length )
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3031 {
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3032 this.radiusInner.setTarget(0);
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3033 }
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3034 else
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3035 {
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3036 this.radiusInner.setTarget(compressedRadii[0]);
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3037 }
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3038
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3039 this.hidePrev = this.hide;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3040 this.hide = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3041 this.hideAlonePrev = this.hideAlone;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3042 this.hideAlone = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3043 this.keyed = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3044 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3045
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3046 if ( hueMax - hueMin > 1 / 12 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3047 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3048 hueMax = hueMin + 1 / 12;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3049 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3050
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3051 // set lightness
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3052 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3053 if ( ! ( hide || this.hideAlone ) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3054 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3055 if ( useHue() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3056 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3057 lightness = (lightnessBase + lightnessMax) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3058 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3059 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3060 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3061 lightness = lightnessBase + (depth - 1) * lightnessFactor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3062
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3063 if ( lightness > lightnessMax )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3064 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3065 lightness = lightnessMax;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3066 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3067 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3068 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3069
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3070 if ( hide )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3071 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3072 this.hide = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3073 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3074
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3075 if ( this.hidePrev == undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3076 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3077 this.hidePrev = this.hide;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3078 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3079
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3080 var hiddenStart = -1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3081 var hiddenHueNumer = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3082 var hiddenHueDenom = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3083 var i = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3084
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3085 if ( ! this.hide )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3086 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3087 this.hiddenEnd = null;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3088 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3089
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3090 while ( true )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3091 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3092 if ( ! this.hideAlone && ! hide && ( i == this.children.length || ! this.children[i].hide ) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3093 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3094 // reached a non-hidden child or the end; set targets for
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3095 // previous group of hidden children (if any) using their
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3096 // average hue
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3097
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3098 if ( hiddenStart != -1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3099 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3100 var hiddenHue = hiddenHueDenom ? hiddenHueNumer / hiddenHueDenom : hueMin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3101
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3102 for ( var j = hiddenStart; j < i; j++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3103 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3104 this.children[j].setTargetsSelected
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3105 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3106 hiddenHue,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3107 null,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3108 lightness,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3109 false,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3110 j < i - 1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3111 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3112
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3113 this.children[j].hiddenEnd = null;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3114 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3115
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3116 this.children[hiddenStart].hiddenEnd = i - 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3117 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3118 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3119
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3120 if ( i == this.children.length )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3121 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3122 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3123 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3124
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3125 var child = this.children[i];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3126 var childHueMin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3127 var childHueMax;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3128
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3129 if ( this.magnitude > 0 && ! this.hide && ! this.hideAlone )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3130 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3131 if ( useHue() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3132 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3133 childHueMin = child.hues[currentDataset];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3134 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3135 else if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3136 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3137 var min = 0.0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3138 var max = 1.0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3139
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3140 if ( this.children.length > 6 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3141 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3142 childHueMin = lerp((1 - Math.pow(1 - i / this.children.length, 1.4)) * .95, 0, 1, min, max);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3143 childHueMax = lerp((1 - Math.pow(1 - (i + .55) / this.children.length, 1.4)) * .95, 0, 1, min, max);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3144 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3145 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3146 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3147 childHueMin = lerp(i / this.children.length, 0, 1, min, max);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3148 childHueMax = lerp((i + .55) / this.children.length, 0, 1, min, max);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3149 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3150 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3151 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3152 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3153 childHueMin = lerp
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3154 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3155 child.baseMagnitude,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3156 this.baseMagnitude,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3157 this.baseMagnitude + this.magnitude,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3158 hueMin,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3159 hueMax
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3160 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3161 childHueMax = lerp
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3162 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3163 child.baseMagnitude + child.magnitude * .99,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3164 this.baseMagnitude,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3165 this.baseMagnitude + this.magnitude,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3166 hueMin,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3167 hueMax
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3168 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3169 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3170 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3171 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3172 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3173 childHueMin = hueMin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3174 childHueMax = hueMax;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3175 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3176
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3177 if ( ! this.hideAlone && ! hide && ! this.hide && child.hide )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3178 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3179 if ( hiddenStart == -1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3180 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3181 hiddenStart = i;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3182 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3183
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3184 if ( useHue() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3185 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3186 hiddenHueNumer += childHueMin * child.magnitude;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3187 hiddenHueDenom += child.magnitude;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3188 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3189 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3190 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3191 hiddenHueNumer += childHueMin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3192 hiddenHueDenom++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3193 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3194 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3195 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3196 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3197 hiddenStart = -1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3198
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3199 this.children[i].setTargetsSelected
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3200 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3201 childHueMin,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3202 childHueMax,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3203 lightness,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3204 hide || this.keyed || this.hideAlone || this.hide && ! collapse,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3205 false
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3206 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3207 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3208
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3209 i++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3210 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3211
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3212 if ( this.hue && this.magnitude )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3213 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3214 this.hue.setTarget(this.hues[currentDataset]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3215
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3216 if ( this.attributes[magnitudeIndex][lastDataset] == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3217 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3218 this.hue.start = this.hue.end;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3219 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3220 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3221
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3222 this.radialPrev = this.radial;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3223
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3224 if ( this == selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3225 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3226 this.resetLabelWidth();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3227 this.labelWidth.setTarget(this.nameWidth * labelWidthFudge);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3228 this.alphaWedge.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3229 this.alphaLabel.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3230 this.alphaOther.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3231 this.alphaArc.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3232 this.alphaLine.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3233 this.alphaPattern.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3234 this.r.setTarget(255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3235 this.g.setTarget(255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3236 this.b.setTarget(255);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3237 this.radial = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3238 this.labelRadius.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3239 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3240 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3241 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3242 var rgb = hslToRgb
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3243 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3244 hueMin,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3245 saturation,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3246 lightness
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3247 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3248
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3249 this.r.setTarget(rgb.r);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3250 this.g.setTarget(rgb.g);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3251 this.b.setTarget(rgb.b);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3252 this.alphaOther.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3253
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3254 this.alphaWedge.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3255
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3256 if ( this.hide || this.hideAlone )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3257 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3258 this.alphaPattern.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3259 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3260 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3261 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3262 this.alphaPattern.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3263 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3264
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3265 // set radial
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3266 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3267 if ( ! ( hide || this.hide ) )//&& ! this.keyed )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3268 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3269 if ( this.hideAlone )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3270 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3271 this.radial = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3272 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3273 else if ( false && canDisplayChildLabels )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3274 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3275 this.radial = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3276 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3277 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3278 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3279 this.radial = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3280
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3281 if ( this.hasChildren() && depth < maxDisplayDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3282 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3283 var lastChild = this.children[this.children.length - 1];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3284
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3285 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3286 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3287 lastChild.angleEnd.end == this.angleEnd.end ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3288 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3289 (this.angleStart.end + this.angleEnd.end) / 2 -
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3290 lastChild.angleEnd.end
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3291 ) * (this.radiusInner.end + 1) * gRadius * 2 <
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3292 minWidth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3293 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3294 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3295 this.radial = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3296 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3297 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3298 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3299 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3300
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3301 // set alphaLabel
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3302 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3303 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3304 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3305 collapse ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3306 hide ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3307 this.hide ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3308 this.keyed ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3309 depth > maxDisplayDepth ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3310 ! this.canDisplayDepth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3311 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3312 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3313 this.alphaLabel.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3314 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3315 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3316 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3317 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3318 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3319 (this.radial || nLabelOffsets[depth - 2])
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3320 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3321 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3322 this.alphaLabel.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3323 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3324 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3325 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3326 this.alphaLabel.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3327
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3328 if ( this.radialPrev )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3329 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3330 this.alphaLabel.start = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3331 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3332 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3333 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3334
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3335 // set alphaArc
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3336 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3337 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3338 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3339 collapse ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3340 hide ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3341 depth > maxDisplayDepth ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3342 ! this.canDisplayDepth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3343 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3344 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3345 this.alphaArc.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3346 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3347 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3348 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3349 this.alphaArc.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3350 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3351
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3352 // set alphaLine
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3353 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3354 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3355 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3356 hide ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3357 this.hide && nextSiblingHidden ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3358 depth > maxDisplayDepth ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3359 ! this.canDisplayDepth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3360 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3361 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3362 this.alphaLine.setTarget(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3363 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3364 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3365 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3366 this.alphaLine.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3367 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3368
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3369 //if ( ! this.radial )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3370 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3371 this.resetLabelWidth();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3372 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3373
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3374 // set labelRadius target
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3375 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3376 if ( collapse )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3377 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3378 this.labelRadius.setTarget(this.radiusInner.end);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3379 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3380 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3381 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3382 if ( depth > maxDisplayDepth || ! this.canDisplayDepth() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3383 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3384 this.labelRadius.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3385 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3386 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3387 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3388 this.setTargetLabelRadius();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3389 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3390 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3391 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3392 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3393
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3394 this.setTargetWedge = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3395 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3396 var depth = this.getDepth() - selectedNode.getDepth() + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3397
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3398 // set angles
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3399 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3400 var baseMagnitudeRelative = this.baseMagnitude - selectedNode.baseMagnitude;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3401 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3402 this.angleStart.setTarget(baseMagnitudeRelative * angleFactor);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3403 this.angleEnd.setTarget((baseMagnitudeRelative + this.magnitude) * angleFactor);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3404
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3405 // set radiusInner
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3406 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3407 if ( depth > maxDisplayDepth || ! this.canDisplayDepth() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3408 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3409 this.radiusInner.setTarget(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3410 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3411 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3412 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3413 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3414 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3415 this.radiusInner.setTarget(compressedRadii[depth - 2]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3416 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3417 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3418 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3419 this.radiusInner.setTarget(nodeRadius * (depth - 1));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3420 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3421 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3422
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3423 if ( this.hide != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3424 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3425 this.hidePrev = this.hide;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3426 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3427
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3428 if ( this.hideAlone != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3429 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3430 this.hideAlonePrev = this.hideAlone;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3431 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3432
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3433 // set hide
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3434 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3435 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3436 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3437 (this.angleEnd.end - this.angleStart.end) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3438 (this.radiusInner.end * gRadius + gRadius) <
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3439 minWidth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3440 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3441 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3442 if ( depth == 2 && ! this.getCollapse() && this.depth <= maxAbsoluteDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3443 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3444 this.keyed = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3445 keys++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3446 this.hide = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3447
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3448 var percentage = this.getPercentage();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3449 this.keyLabel = this.name + ' ' + percentage + '%';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3450 var dim = context.measureText(this.keyLabel);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3451 this.keyNameWidth = dim.width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3452 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3453 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3454 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3455 this.keyed = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3456 this.hide = depth > 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3457 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3458 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3459 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3460 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3461 this.keyed = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3462 this.hide = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3463 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3464 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3465
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3466 this.shortenLabel = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3467 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3468 var label = this.name;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3469
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3470 var labelWidth = this.nameWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3471 var maxWidth = this.labelWidth.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3472 var minEndLength = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3473
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3474 if ( labelWidth > maxWidth && label.length > minEndLength * 2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3475 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3476 var endLength =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3477 Math.floor((label.length - 1) * maxWidth / labelWidth / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3478
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3479 if ( endLength < minEndLength )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3480 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3481 endLength = minEndLength;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3482 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3483
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3484 return (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3485 label.substring(0, endLength) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3486 '...' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3487 label.substring(label.length - endLength));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3488 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3489 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3490 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3491 return label;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3492 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3493 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3494
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3495 /* this.shouldAddSearchResultsString = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3496 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3497 if ( this.isSearchResult )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3498 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3499 return this.searchResults > 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3500 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3501 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3502 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3503 return this.searchResults > 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3504 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3505 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3506 */
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3507 this.sort = function()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3508 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3509 this.children.sort(function(a, b){return b.getMagnitude() - a.getMagnitude()});
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3510
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3511 for (var i = 0; i < this.children.length; i++)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3512 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3513 this.children[i].sort();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3514 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3515 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3516 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3517
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3518 var options;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3519
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3520 function addOptionElement(position, innerHTML, title)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3521 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3522 var div = document.createElement("div");
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3523 // div.style.position = 'absolute';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3524 // div.style.top = position + 'px';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3525 div.innerHTML = innerHTML;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3526 // div.style.display = 'block';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3527 div.style.padding = '2px';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3528
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3529 if ( title )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3530 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3531 div.title = title;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3532 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3533
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3534 options.appendChild(div);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3535 var height = 0;//div.clientHeight;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3536 return position + height;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3537 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3538
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3539 function addOptionElements(hueName, hueDefault)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3540 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3541 options = document.createElement('div');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3542 options.style.position = 'absolute';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3543 options.style.top = '0px';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3544 options.addEventListener('mousedown', function(e) {mouseClick(e)}, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3545 // options.onmouseup = function(e) {mouseUp(e)}
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3546 document.body.appendChild(options);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3547
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3548 document.body.style.font = '11px sans-serif';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3549 var position = 5;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3550
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3551 details = document.createElement('div');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3552 details.style.position = 'absolute';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3553 details.style.top = '1%';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3554 details.style.right = '2%';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3555 details.style.textAlign = 'right';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3556 document.body.insertBefore(details, canvas);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3557 // <div id="details" style="position:absolute;top:1%;right:2%;text-align:right;">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3558
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3559 details.innerHTML = '\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3560 <span id="detailsName" style="font-weight:bold"></span>&nbsp;\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3561 <input type="button" id="detailsExpand" onclick="expand(focusNode);"\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3562 value="&harr;" title="Expand this wedge to become the new focus of the chart"/><br/>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3563 <div id="detailsInfo" style="float:right"></div>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3564
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3565 keyControl = document.createElement('input');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3566 keyControl.type = 'button';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3567 keyControl.value = showKeys ? 'x' : '…';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3568 keyControl.style.position = '';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3569 keyControl.style.position = 'fixed';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3570 keyControl.style.visibility = 'hidden';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3571
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3572 document.body.insertBefore(keyControl, canvas);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3573
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3574 var logoElement = document.getElementById('logo');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3575
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3576 if ( logoElement )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3577 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3578 logoImage = logoElement.src;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3579 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3580 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3581 {
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3582 logoImage = 'http://marbl.github.io/Krona/img/logo-med.png';
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3583 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3584
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3585 // document.getElementById('options').style.fontSize = '9pt';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3586 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3587 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3588 position,
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3589 '<a style="margin:2px" target="_blank" href="https://github.com/marbl/Krona/wiki"><img style="vertical-align:middle;width:108px;height:30px;" src="' + logoImage + '" alt="Logo of Krona"/></a><input type="button" id="back" value="&larr;" title="Go back (Shortcut: &larr;)"/>\
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3590 <input type="button" id="forward" value="&rarr;" title="Go forward (Shortcut: &rarr;)"/> \
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3591 &nbsp;Search: <input type="text" id="search"/>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3592 <input id="searchClear" type="button" value="x" onclick="clearSearch()"/> \
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3593 <span id="searchResults"></span>'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3594 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3595
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3596 if ( datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3597 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3598 var size = datasets < datasetSelectSize ? datasets : datasetSelectSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3599
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3600 var select =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3601 '<table style="border-collapse:collapse;padding:0px"><tr><td style="padding:0px">' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3602 '<select id="datasets" style="min-width:100px" size="' + size + '" onchange="onDatasetChange()">';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3603
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3604 for ( var i = 0; i < datasetNames.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3605 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3606 select += '<option>' + datasetNames[i] + '</option>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3607 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3608
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3609 select +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3610 '</select></td><td style="vertical-align:top;padding:1px;">' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3611 '<input style="display:block" title="Previous dataset (Shortcut: &uarr;)" id="prevDataset" type="button" value="&uarr;" onclick="prevDataset()" disabled="true"/>' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3612 '<input title="Next dataset (Shortcut: &darr;)" id="nextDataset" type="button" value="&darr;" onclick="nextDataset()"/><br/></td>' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3613 '<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>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3614
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3615 position = addOptionElement(position + 5, select);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3616
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3617 datasetDropDown = document.getElementById('datasets');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3618 datasetButtonLast = document.getElementById('lastDataset');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3619 datasetButtonPrev = document.getElementById('prevDataset');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3620 datasetButtonNext = document.getElementById('nextDataset');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3621
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3622 position += datasetDropDown.clientHeight;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3623 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3624
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3625 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3626 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3627 position + 5,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3628 '<input type="button" id="maxAbsoluteDepthDecrease" value="-"/>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3629 <span id="maxAbsoluteDepth"></span>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3630 &nbsp;<input type="button" id="maxAbsoluteDepthIncrease" value="+"/> Max depth',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3631 'Maximum depth to display, counted from the top level \
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3632 and including collapsed wedges.'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3633 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3634
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3635 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3636 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3637 position,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3638 '<input type="button" id="fontSizeDecrease" value="-"/>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3639 <span id="fontSize"></span>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3640 &nbsp;<input type="button" id="fontSizeIncrease" value="+"/> Font size'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3641 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3642
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3643 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3644 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3645 position,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3646 '<input type="button" id="radiusDecrease" value="-"/>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3647 <input type="button" id="radiusIncrease" value="+"/> Chart size'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3648 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3649
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3650 if ( hueName )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3651 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3652 hueDisplayName = attributes[attributeIndex(hueName)].displayName;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3653
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3654 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3655 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3656 position + 5,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3657 '<input type="checkbox" id="useHue" style="float:left" ' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3658 '/><div>Color by<br/>' + hueDisplayName +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3659 '</div>'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3660 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3661
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3662 useHueCheckBox = document.getElementById('useHue');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3663 useHueCheckBox.checked = hueDefault;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3664 useHueCheckBox.onclick = handleResize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3665 useHueCheckBox.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3666 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3667 /*
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3668 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3669 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3670 position + 5,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3671 '&nbsp;<input type="checkbox" id="shorten" checked="checked" />Shorten labels</div>',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3672 'Prevent labels from overlapping by shortening them'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3673 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3674
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3675 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3676 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3677 position,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3678 '&nbsp;<input type="checkbox" id="compress" checked="checked" />Compress',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3679 'Compress wedges if needed to show the entire depth'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3680 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3681 */
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3682 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3683 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3684 position,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3685 '<input type="checkbox" id="collapse" checked="checked" />Collapse',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3686 'Collapse wedges that are redundant (entirely composed of another wedge)'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3687 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3688
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3689 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3690 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3691 position + 5,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3692 '<input type="button" id="snapshot" value="Snapshot"/>',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3693 'Render the current view as SVG (Scalable Vector Graphics), a publication-\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3694 quality format that can be printed and saved (see Help for browser compatibility)'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3695 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3696
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3697 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3698 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3699 position + 5,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3700 '<input type="button" id="linkButton" value="Link"/>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3701 <input type="text" size="30" id="linkText"/>',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3702 'Show a link to this view that can be copied for bookmarking or sharing'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3703 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3704
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3705 position = addOptionElement
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3706 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3707 position + 5,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3708 '<input type="button" id="help" value="?"\
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
3709 onclick="window.open(\'https://github.com/marbl/Krona/wiki/Browsing%20Krona%20charts\', \'help\')"/>',
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3710 'Help'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3711 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3712 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3713
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3714 function arrow(angleStart, angleEnd, radiusInner)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3715 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3716 if ( context.globalAlpha == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3717 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3718 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3719 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3720
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3721 var angleCenter = (angleStart + angleEnd) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3722 var radiusArrowInner = radiusInner - gRadius / 10;//nodeRadius * gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3723 var radiusArrowOuter = gRadius * 1.1;//(1 + nodeRadius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3724 var radiusArrowCenter = (radiusArrowInner + radiusArrowOuter) / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3725 var pointLength = (radiusArrowOuter - radiusArrowInner) / 5;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3726
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3727 context.fillStyle = highlightFill;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3728 context.lineWidth = highlightLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3729
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3730 // First, mask out the first half of the arrow. This will prevent the tips
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3731 // from superimposing if the arrow goes most of the way around the circle.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3732 // Masking is done by setting the clipping region to the inverse of the
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3733 // half-arrow, which is defined by cutting the half-arrow out of a large
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3734 // rectangle
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3735 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3736 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3737 context.arc(0, 0, radiusInner, angleCenter, angleEnd, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3738 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3739 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3740 radiusArrowInner * Math.cos(angleEnd),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3741 radiusArrowInner * Math.sin(angleEnd)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3742 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3743 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3744 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3745 radiusArrowCenter * Math.cos(angleEnd) - pointLength * Math.sin(angleEnd),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3746 radiusArrowCenter * Math.sin(angleEnd) + pointLength * Math.cos(angleEnd)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3747 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3748 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3749 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3750 radiusArrowOuter * Math.cos(angleEnd),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3751 radiusArrowOuter * Math.sin(angleEnd)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3752 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3753 context.arc(0, 0, gRadius, angleEnd, angleCenter, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3754 context.closePath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3755 context.moveTo(-imageWidth, -imageHeight);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3756 context.lineTo(imageWidth, -imageHeight);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3757 context.lineTo(imageWidth, imageHeight);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3758 context.lineTo(-imageWidth, imageHeight);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3759 context.closePath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3760 context.save();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3761 context.clip();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3762
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3763 // Next, draw the other half-arrow with the first half masked out
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3764 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3765 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3766 context.arc(0, 0, radiusInner, angleCenter, angleStart, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3767 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3768 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3769 radiusArrowInner * Math.cos(angleStart),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3770 radiusArrowInner * Math.sin(angleStart)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3771 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3772 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3773 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3774 radiusArrowCenter * Math.cos(angleStart) + pointLength * Math.sin(angleStart),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3775 radiusArrowCenter * Math.sin(angleStart) - pointLength * Math.cos(angleStart)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3776 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3777 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3778 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3779 radiusArrowOuter * Math.cos(angleStart),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3780 radiusArrowOuter * Math.sin(angleStart)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3781 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3782 context.arc(0, 0, gRadius, angleStart, angleCenter, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3783 context.fill();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3784 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3785
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3786 // Finally, remove the clipping region and draw the first half-arrow. This
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3787 // half is extended slightly to fill the seam.
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3788 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3789 context.restore();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3790 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3791 context.arc(0, 0, radiusInner, angleCenter - 2 / (2 * Math.PI * radiusInner), angleEnd, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3792 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3793 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3794 radiusArrowInner * Math.cos(angleEnd),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3795 radiusArrowInner * Math.sin(angleEnd)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3796 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3797 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3798 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3799 radiusArrowCenter * Math.cos(angleEnd) - pointLength * Math.sin(angleEnd),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3800 radiusArrowCenter * Math.sin(angleEnd) + pointLength * Math.cos(angleEnd)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3801 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3802 context.lineTo
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3803 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3804 radiusArrowOuter * Math.cos(angleEnd),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3805 radiusArrowOuter * Math.sin(angleEnd)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3806 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3807 context.arc(0, 0, gRadius, angleEnd, angleCenter - 2 / (2 * Math.PI * gRadius), true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3808 context.fill();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3809 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3810 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3811
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3812 function attributeIndex(aname)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3813 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3814 for ( var i = 0 ; i < attributes.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3815 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3816 if ( aname == attributes[i].name )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3817 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3818 return i;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3819 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3820 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3821
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3822 return null;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3823 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3824
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3825 function checkHighlight()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3826 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3827 var lastHighlightedNode = highlightedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3828 var lastHighlightingHidden = highlightingHidden;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3829
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3830 highlightedNode = selectedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3831 resetKeyOffset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3832
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3833 if ( progress == 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3834 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3835 selectedNode.checkHighlight();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3836 if ( selectedNode.getParent() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3837 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3838 selectedNode.getParent().checkHighlightCenter();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3839 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3840
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3841 focusNode.checkHighlightMap();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3842 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3843
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3844 if ( highlightedNode != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3845 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3846 if ( highlightedNode == focusNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3847 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3848 // canvas.style.display='none';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3849 // window.resizeBy(1,0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3850 // canvas.style.cursor='ew-resize';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3851 // window.resizeBy(-1,0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3852 // canvas.style.display='inline';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3853 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3854 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3855 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3856 // canvas.style.cursor='pointer';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3857 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3858 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3859 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3860 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3861 // canvas.style.cursor='auto';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3862 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3863
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3864 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3865 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3866 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3867 true ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3868 highlightedNode != lastHighlightedNode ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3869 highlightingHidden != highlightingHiddenLast
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3870 ) &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3871 progress == 1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3872 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3873 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3874 draw(); // TODO: handle in update()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3875 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3876 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3877
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3878 function checkSelectedCollapse()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3879 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3880 var newNode = selectedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3881
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3882 while ( newNode.getCollapse() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3883 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3884 newNode = newNode.children[0];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3885 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3886
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
3887 if ( newNode.children.length == 0 && newNode.getParent() )
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3888 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3889 newNode = newNode.getParent();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3890 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3891
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3892 if ( newNode != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3893 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3894 selectNode(newNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3895 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3896 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3897
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3898 function clearSearch()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3899 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3900 if ( search.value != '' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3901 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3902 search.value = '';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3903 onSearchChange();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3904 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3905 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3906
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3907 function createSVG()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3908 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3909 svgNS = "http://www.w3.org/2000/svg";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3910 var SVG = {};
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3911 SVG.xlinkns = "http://www.w3.org/1999/xlink";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3912
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3913 var newSVG = document.createElementNS(svgNS, "svg:svg");
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3914
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3915 newSVG.setAttribute("id", "canvas");
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3916 // How big is the canvas in pixels
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3917 newSVG.setAttribute("width", '100%');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3918 newSVG.setAttribute("height", '100%');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3919 // Set the coordinates used by drawings in the canvas
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3920 // newSVG.setAttribute("viewBox", "0 0 " + imageWidth + " " + imageHeight);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3921 // Define the XLink namespace that SVG uses
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3922 newSVG.setAttributeNS
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3923 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3924 "http://www.w3.org/2000/xmlns/",
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3925 "xmlns:xlink",
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3926 SVG.xlinkns
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3927 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3928
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3929 return newSVG;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3930 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3931
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3932 function degrees(radians)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3933 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3934 return radians * 180 / Math.PI;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3935 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3936
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3937 function draw()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3938 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3939 tweenFrames++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3940 //resize();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3941 // context.fillRect(0, 0, imageWidth, imageHeight);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3942 context.clearRect(0, 0, imageWidth, imageHeight);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3943
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3944 context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3945 context.textBaseline = 'middle';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3946
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3947 //context.strokeStyle = 'rgba(0, 0, 0, 0.3)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3948 context.translate(centerX, centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3949
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3950 resetKeyOffset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3951
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3952 head.draw(false, false); // draw pie slices
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3953 head.draw(true, false); // draw labels
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3954
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3955 var pathRoot = selectedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3956
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3957 if ( focusNode != 0 && focusNode != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3958 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3959 context.globalAlpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3960 focusNode.drawHighlight(true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3961 pathRoot = focusNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3962 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3963
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3964 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3965 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3966 highlightedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3967 highlightedNode.getDepth() >= selectedNode.getDepth() &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3968 highlightedNode != focusNode
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3969 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3970 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3971 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3972 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3973 progress == 1 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3974 highlightedNode != selectedNode &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3975 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3976 highlightedNode != focusNode ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3977 focusNode.children.length > 0
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3978 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3979 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3980 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3981 context.globalAlpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3982 highlightedNode.drawHighlight(true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3983 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3984
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3985 //pathRoot = highlightedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3986 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3987 else if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3988 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3989 progress == 1 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3990 highlightedNode.getDepth() < selectedNode.getDepth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3991 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3992 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3993 context.globalAlpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3994 highlightedNode.drawHighlightCenter();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3995 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3996
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3997 if ( quickLook && false) // TEMP
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3998 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
3999 context.globalAlpha = 1 - progress / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4000 selectedNode.drawHighlight(true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4001 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4002 else if ( progress < 1 )//&& zoomOut() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4003 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4004 if ( !zoomOut)//() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4005 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4006 context.globalAlpha = selectedNode.alphaLine.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4007 selectedNode.drawHighlight(true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4008 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4009 else if ( selectedNodeLast )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4010 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4011 context.globalAlpha = 1 - 4 * Math.pow(progress - .5, 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4012 selectedNodeLast.drawHighlight(false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4013 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4014 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4015
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4016 drawDatasetName();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4017
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4018 //drawHistory();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4019
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4020 context.translate(-centerX, -centerY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4021 context.globalAlpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4022
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4023 mapRadius =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4024 (imageHeight / 2 - details.clientHeight - details.offsetTop) /
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4025 (pathRoot.getDepth() - 1) * 3 / 4 / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4026
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4027 if ( mapRadius > maxMapRadius )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4028 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4029 mapRadius = maxMapRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4030 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4031
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4032 mapBuffer = mapRadius / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4033
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4034 //context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4035 pathRoot.drawMap(pathRoot);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4036
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4037 if ( hueDisplayName && useHue() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4038 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4039 drawLegend();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4040 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4041 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4042
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4043 function drawBubble(angle, radius, width, radial, flip)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4044 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4045 var height = fontSize * 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4046 var x;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4047 var y;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4048
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4049 width = width + fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4050
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4051 if ( radial )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4052 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4053 y = -fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4054
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4055 if ( flip )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4056 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4057 x = radius - width + fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4058 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4059 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4060 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4061 x = radius - fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4062 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4063 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4064 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4065 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4066 x = -width / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4067 y = -radius - fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4068 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4069
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4070 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4071 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4072 drawBubbleSVG(x + centerX, y + centerY, width, height, fontSize, angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4073 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4074 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4075 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4076 drawBubbleCanvas(x, y, width, height, fontSize, angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4077 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4078 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4079
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4080 function drawBubbleCanvas(x, y, width, height, radius, rotation)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4081 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4082 context.strokeStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4083 context.lineWidth = highlightLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4084 context.fillStyle = 'rgba(255, 255, 255, .75)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4085 context.rotate(rotation);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4086 roundedRectangle(x, y, width, fontSize * 2, fontSize);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4087 context.fill();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4088 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4089 context.rotate(-rotation);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4090 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4091
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4092 function drawBubbleSVG(x, y, width, height, radius, rotation)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4093 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4094 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4095 '<rect x="' + x + '" y="' + y +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4096 '" width="' + width +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4097 '" height="' + height +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4098 '" rx="' + radius +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4099 '" ry="' + radius +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4100 '" fill="rgba(255, 255, 255, .75)' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4101 '" class="highlight" ' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4102 'transform="rotate(' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4103 degrees(rotation) + ',' + centerX + ',' + centerY +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4104 ')"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4105 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4106
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4107 function drawDatasetName()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4108 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4109 var alpha = datasetAlpha.current();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4110
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4111 if ( alpha > 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4112 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4113 var radius = gRadius * compressedRadii[0] / -2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4114
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4115 if ( alpha > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4116 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4117 alpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4118 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4119
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4120 context.globalAlpha = alpha;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4121
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4122 drawBubble(0, -radius, datasetWidths[currentDataset], false, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4123 drawText(datasetNames[currentDataset], 0, radius, 0, 'center', true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4124 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4125 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4126
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4127 function drawHistory()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4128 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4129 var alpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4130 context.textAlign = 'center';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4131
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4132 for ( var i = 0; i < nodeHistoryPosition && alpha > 0; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4133 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4134
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4135 context.globalAlpha = alpha - historyAlphaDelta * tweenFactor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4136 context.fillText
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4137 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4138 nodeHistory[nodeHistoryPosition - i - 1].name,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4139 0,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4140 (i + tweenFactor) * historySpacingFactor * fontSize - 1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4141 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4142
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4143 if ( alpha > 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4144 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4145 alpha -= historyAlphaDelta;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4146 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4147 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4148
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4149 context.globalAlpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4150 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4151
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4152 function drawLegend()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4153 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4154 var left = imageWidth * .01;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4155 var width = imageHeight * .0265;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4156 var height = imageHeight * .15;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4157 var top = imageHeight - fontSize * 3.5 - height;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4158 var textLeft = left + width + fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4159
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4160 context.fillStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4161 context.textAlign = 'start';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4162 context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4163 // context.fillText(valueStartText, textLeft, top + height);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4164 // context.fillText(valueEndText, textLeft, top);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4165 context.fillText(hueDisplayName, left, imageHeight - fontSize * 1.5);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4166
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4167 var gradient = context.createLinearGradient(0, top + height, 0, top);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4168
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4169 for ( var i = 0; i < hueStopPositions.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4170 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4171 gradient.addColorStop(hueStopPositions[i], hueStopHsl[i]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4172
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4173 var textY = top + (1 - hueStopPositions[i]) * height;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4174
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4175 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4176 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4177 i == 0 ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4178 i == hueStopPositions.length - 1 ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4179 textY > top + fontSize && textY < top + height - fontSize
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4180 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4181 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4182 context.fillText(hueStopText[i], textLeft, textY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4183 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4184 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4185
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4186 context.fillStyle = gradient;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4187 context.fillRect(left, top, width, height);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4188 context.lineWidth = thinLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4189 context.strokeRect(left, top, width, height);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4190 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4191
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4192 function drawLegendSVG()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4193 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4194 var left = imageWidth * .01;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4195 var width = imageHeight * .0265;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4196 var height = imageHeight * .15;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4197 var top = imageHeight - fontSize * 3.5 - height;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4198 var textLeft = left + width + fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4199
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4200 var text = '';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4201
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4202 text += svgText(hueDisplayName, left, imageHeight - fontSize * 1.5);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4203
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4204 var svgtest = '<linearGradient id="gradient" x1="0%" y1="100%" x2="0%" y2="0%">';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4205
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4206 for ( var i = 0; i < hueStopPositions.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4207 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4208 svgtest +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4209 '<stop offset="' + round(hueStopPositions[i] * 100) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4210 '%" style="stop-color:' + hueStopHsl[i] + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4211
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4212 var textY = top + (1 - hueStopPositions[i]) * height;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4213
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4214 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4215 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4216 i == 0 ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4217 i == hueStopPositions.length - 1 ||
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4218 textY > top + fontSize && textY < top + height - fontSize
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4219 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4220 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4221 text += svgText(hueStopText[i], textLeft, textY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4222 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4223 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4224
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4225 svgtest += '</linearGradient>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4226 //alert(svgtest);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4227 svg += svgtest;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4228 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4229 '<rect style="fill:url(#gradient)" x="' + left + '" y="' + top +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4230 '" width="' + width + '" height="' + height + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4231
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4232 svg += text;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4233 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4234
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4235 function drawSearchHighlights(label, bubbleX, bubbleY, rotation, center)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4236 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4237 var index = -1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4238 var labelLength = label.length;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4239
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4240 bubbleX -= fontSize / 4;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4241
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4242 do
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4243 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4244 index = label.toLowerCase().indexOf(search.value.toLowerCase(), index + 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4245
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4246 if ( index != -1 && index < labelLength )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4247 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4248 var dim = context.measureText(label.substr(0, index));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4249 var x = bubbleX + dim.width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4250
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4251 dim = context.measureText(label.substr(index, search.value.length));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4252
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4253 var y = bubbleY - fontSize * 3 / 4;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4254 var width = dim.width + fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4255 var height = fontSize * 3 / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4256 var radius = fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4257
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4258 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4259 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4260 if ( center )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4261 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4262 x += centerX;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4263 y += centerY;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4264 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4265
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4266 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4267 '<rect x="' + x + '" y="' + y +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4268 '" width="' + width +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4269 '" height="' + height +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4270 '" rx="' + radius +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4271 '" ry="' + radius +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4272 '" class="searchHighlight' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4273 '" transform="rotate(' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4274 degrees(rotation) + ',' + centerX + ',' + centerY +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4275 ')"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4276 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4277 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4278 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4279 context.fillStyle = 'rgb(255, 255, 100)';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4280 context.rotate(rotation);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4281 roundedRectangle(x, y, width, height, radius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4282 context.fill();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4283 context.rotate(-rotation);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4284 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4285 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4286 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4287 while ( index != -1 && index < labelLength );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4288 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4289
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4290 function drawText(text, x, y, angle, anchor, bold, color)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4291 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4292 if ( color == undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4293 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4294 color = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4295 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4296
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4297 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4298 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4299 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4300 '<text x="' + (centerX + x) + '" y="' + (centerY + y) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4301 '" text-anchor="' + anchor + '" style="font-color:' + color + ';font-weight:' + (bold ? 'bold' : 'normal') +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4302 '" transform="rotate(' + degrees(angle) + ',' + centerX + ',' + centerY + ')">' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4303 text + '</text>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4304 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4305 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4306 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4307 context.fillStyle = color;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4308 context.textAlign = anchor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4309 context.font = bold ? fontBold : fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4310 context.rotate(angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4311 context.fillText(text, x, y);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4312 context.rotate(-angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4313 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4314 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4315
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4316 function drawTextPolar
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4317 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4318 text,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4319 innerText,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4320 angle,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4321 radius,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4322 radial,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4323 bubble,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4324 bold,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4325 searchResult,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4326 searchResults
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4327 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4328 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4329 var anchor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4330 var textX;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4331 var textY;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4332 var spacer;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4333 var totalText = text;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4334 var flip;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4335
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4336 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4337 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4338 spacer = '&#160;&#160;&#160;';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4339 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4340 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4341 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4342 spacer = ' ';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4343 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4344
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4345 if ( radial )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4346 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4347 flip = angle < 3 * Math.PI / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4348
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4349 if ( flip )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4350 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4351 angle -= Math.PI;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4352 radius = -radius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4353 anchor = 'end';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4354
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4355 if ( innerText )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4356 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4357 totalText = text + spacer + innerText;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4358 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4359 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4360 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4361 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4362 anchor = 'start';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4363
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4364 if ( innerText )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4365 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4366 totalText = innerText + spacer + text;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4367 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4368 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4369
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4370 textX = radius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4371 textY = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4372 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4373 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4374 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4375 flip = angle < Math.PI || angle > 2 * Math.PI;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4376 var label;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4377
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4378 anchor = snapshotMode ? 'middle' : 'center';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4379
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4380 if ( flip )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4381 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4382 angle -= Math.PI;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4383 radius = -radius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4384 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4385
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4386 angle += Math.PI / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4387 textX = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4388 textY = -radius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4389 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4390
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4391 if ( bubble )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4392 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4393 var textActual = totalText;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4394
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4395 if ( innerText && snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4396 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4397 if ( flip )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4398 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4399 textActual = text + ' ' + innerText;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4400 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4401 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4402 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4403 textActual = innerText + ' ' + text;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4404 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4405 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4406
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4407 if ( searchResults )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4408 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4409 textActual = textActual + searchResultString(searchResults);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4410 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4411
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4412 var textWidth = measureText(textActual, bold);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4413
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4414 var x = textX;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4415
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4416 if ( anchor == 'end' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4417 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4418 x -= textWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4419 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4420 else if ( anchor != 'start' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4421 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4422 // centered
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4423 x -= textWidth / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4424 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4425
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4426 drawBubble(angle, radius, textWidth, radial, flip);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4427
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4428 if ( searchResult )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4429 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4430 drawSearchHighlights
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4431 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4432 textActual,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4433 x,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4434 textY,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4435 angle,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4436 true
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4437 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4438 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4439 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4440
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4441 if ( searchResults )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4442 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4443 totalText = totalText + searchResultString(searchResults);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4444 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4445
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4446 drawText(totalText, textX, textY, angle, anchor, bold);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4447
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4448 return flip;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4449 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4450
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4451 function drawTick(start, length, angle)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4452 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4453 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4454 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4455 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4456 '<line x1="' + (centerX + start) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4457 '" y1="' + centerY +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4458 '" x2="' + (centerX + start + length) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4459 '" y2="' + centerY +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4460 '" class="tick" transform="rotate(' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4461 degrees(angle) + ',' + centerX + ',' + centerY +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4462 ')"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4463 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4464 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4465 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4466 context.rotate(angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4467 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4468 context.moveTo(start, 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4469 context.lineTo(start + length, 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4470 context.lineWidth = thinLineWidth * 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4471 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4472 context.rotate(-angle);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4473 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4474 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4475
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4476 function drawWedge
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4477 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4478 angleStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4479 angleEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4480 radiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4481 radiusOuter,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4482 color,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4483 patternAlpha,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4484 highlight
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4485 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4486 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4487 if ( context.globalAlpha == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4488 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4489 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4490 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4491
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4492 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4493 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4494 if ( angleEnd == angleStart + Math.PI * 2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4495 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4496 // fudge to prevent overlap, which causes arc ambiguity
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4497 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4498 angleEnd -= .1 / gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4499 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4500
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4501 var longArc = angleEnd - angleStart > Math.PI ? 1 : 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4502
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4503 var x1 = centerX + radiusInner * Math.cos(angleStart);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4504 var y1 = centerY + radiusInner * Math.sin(angleStart);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4505
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4506 var x2 = centerX + gRadius * Math.cos(angleStart);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4507 var y2 = centerY + gRadius * Math.sin(angleStart);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4508
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4509 var x3 = centerX + gRadius * Math.cos(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4510 var y3 = centerY + gRadius * Math.sin(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4511
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4512 var x4 = centerX + radiusInner * Math.cos(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4513 var y4 = centerY + radiusInner * Math.sin(angleEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4514
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4515 var dArray =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4516 [
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4517 " M ", x1, ",", y1,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4518 " L ", x2, ",", y2,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4519 " A ", gRadius, ",", gRadius, " 0 ", longArc, ",1 ", x3, ",", y3,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4520 " L ", x4, ",", y4,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4521 " A ", radiusInner, ",", radiusInner, " 0 ", longArc, " 0 ", x1, ",", y1,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4522 " Z "
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4523 ];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4524
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4525 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4526 '<path class="'+ (highlight ? 'highlight' : 'wedge') + '" fill="' + color +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4527 '" d="' + dArray.join('') + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4528
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4529 if ( patternAlpha > 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4530 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4531 svg +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4532 '<path class="wedge" fill="url(#hiddenPattern)" d="' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4533 dArray.join('') + '"/>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4534 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4535 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4536 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4537 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4538 // fudge to prevent seams during animation
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4539 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4540 angleEnd += 1 / gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4541
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4542 context.fillStyle = color;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4543 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4544 context.arc(0, 0, radiusInner, angleStart, angleEnd, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4545 context.arc(0, 0, radiusOuter, angleEnd, angleStart, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4546 context.closePath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4547 context.fill();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4548
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4549 if ( patternAlpha > 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4550 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4551 context.save();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4552 context.clip();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4553 context.globalAlpha = patternAlpha;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4554 context.fillStyle = hiddenPattern;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4555 context.fill();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4556 context.restore();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4557 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4558
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4559 if ( highlight )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4560 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4561 context.lineWidth = highlight ? highlightLineWidth : thinLineWidth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4562 context.strokeStyle = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4563 context.stroke();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4564 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4565 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4566 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4567
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4568 function expand(node)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4569 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4570 selectNode(node);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4571 updateView();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4572 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4573
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4574 function focusLost()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4575 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4576 mouseX = -1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4577 mouseY = -1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4578 checkHighlight();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4579 document.body.style.cursor = 'auto';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4580 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4581
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4582 function fontSizeDecrease()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4583 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4584 if ( fontSize > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4585 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4586 fontSize--;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4587 updateViewNeeded = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4588 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4589 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4590
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4591 function fontSizeIncrease()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4592 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4593 fontSize++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4594 updateViewNeeded = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4595 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4596
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4597 function getGetString(name, value, bool)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4598 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4599 return name + '=' + (bool ? value ? 'true' : 'false' : value);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4600 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4601
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4602 function hideLink()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4603 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4604 hide(linkText);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4605 show(linkButton);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4606 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4607
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4608 function show(object)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4609 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4610 object.style.display = 'inline';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4611 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4612
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4613 function hide(object)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4614 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4615 object.style.display = 'none';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4616 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4617
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4618 function showLink()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4619 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4620 var urlHalves = String(document.location).split('?');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4621 var newGetVariables = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4622
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4623 newGetVariables.push
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4624 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4625 getGetString('dataset', currentDataset, false),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4626 getGetString('node', selectedNode.id, false),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4627 getGetString('collapse', collapse, true),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4628 getGetString('color', useHue(), true),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4629 getGetString('depth', maxAbsoluteDepth - 1, false),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4630 getGetString('font', fontSize, false),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4631 getGetString('key', showKeys, true)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4632 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4633
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4634 hide(linkButton);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4635 show(linkText);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4636 linkText.value = urlHalves[0] + '?' + getVariables.concat(newGetVariables).join('&');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4637 //linkText.disabled = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4638 linkText.focus();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4639 linkText.select();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4640 //linkText.disabled = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4641 // document.location = urlHalves[0] + '?' + getVariables.join('&');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4642 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4643
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4644 function getFirstChild(element)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4645 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4646 element = element.firstChild;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4647
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4648 if ( element && element.nodeType != 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4649 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4650 element = getNextSibling(element);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4651 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4652
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4653 return element;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4654 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4655
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4656 function getNextSibling(element)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4657 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4658 do
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4659 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4660 element = element.nextSibling;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4661 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4662 while ( element && element.nodeType != 1 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4663
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4664 return element;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4665 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4666
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4667 function getPercentage(fraction)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4668 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4669 return round(fraction * 100);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4670 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4671
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4672 function hslText(hue)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4673 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4674 if ( 1 || snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4675 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4676 // Safari doesn't seem to allow hsl() in SVG
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4677
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4678 var rgb = hslToRgb(hue, saturation, (lightnessBase + lightnessMax) / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4679
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4680 return rgbText(rgb.r, rgb.g, rgb.b);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4681 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4682 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4683 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4684 var hslArray =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4685 [
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4686 'hsl(',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4687 Math.floor(hue * 360),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4688 ',',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4689 Math.floor(saturation * 100),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4690 '%,',
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4691 Math.floor((lightnessBase + lightnessMax) * 50),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4692 '%)'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4693 ];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4694
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4695 return hslArray.join('');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4696 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4697 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4698
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4699 function hslToRgb(h, s, l)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4700 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4701 var m1, m2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4702 var r, g, b;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4703
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4704 if (s == 0)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4705 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4706 r = g = b = Math.floor((l * 255));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4707 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4708 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4709 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4710 if (l <= 0.5)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4711 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4712 m2 = l * (s + 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4713 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4714 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4715 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4716 m2 = l + s - l * s;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4717 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4718
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4719 m1 = l * 2 - m2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4720
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4721 r = Math.floor(hueToRgb(m1, m2, h + 1 / 3));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4722 g = Math.floor(hueToRgb(m1, m2, h));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4723 b = Math.floor(hueToRgb(m1, m2, h - 1/3));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4724 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4725
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4726 return {r: r, g: g, b: b};
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4727 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4728
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4729 function hueToRgb(m1, m2, hue)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4730 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4731 var v;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4732
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4733 while (hue < 0)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4734 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4735 hue += 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4736 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4737
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4738 while (hue > 1)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4739 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4740 hue -= 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4741 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4742
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4743 if (6 * hue < 1)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4744 v = m1 + (m2 - m1) * hue * 6;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4745 else if (2 * hue < 1)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4746 v = m2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4747 else if (3 * hue < 2)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4748 v = m1 + (m2 - m1) * (2/3 - hue) * 6;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4749 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4750 v = m1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4751
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4752 return 255 * v;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4753 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4754
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4755 function interpolateHue(hueStart, hueEnd, valueStart, valueEnd)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4756 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4757 // since the gradient will be RGB based, we need to add stops to hit all the
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4758 // colors in the hue spectrum
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4759
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4760 hueStopPositions = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4761 hueStopHsl = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4762 hueStopText = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4763
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4764 hueStopPositions.push(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4765 hueStopHsl.push(hslText(hueStart));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4766 hueStopText.push(round(valueStart));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4767
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4768 for
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4769 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4770 var i = (hueStart > hueEnd ? 5 / 6 : 1 / 6);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4771 (hueStart > hueEnd ? i > 0 : i < 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4772 i += (hueStart > hueEnd ? -1 : 1) / 6
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4773 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4774 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4775 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4776 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4777 hueStart > hueEnd ?
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4778 i > hueEnd && i < hueStart :
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4779 i > hueStart && i < hueEnd
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4780 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4781 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4782 hueStopPositions.push(lerp(i, hueStart, hueEnd, 0, 1));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4783 hueStopHsl.push(hslText(i));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4784 hueStopText.push(round(lerp
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4785 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4786 i,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4787 hueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4788 hueEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4789 valueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4790 valueEnd
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4791 )));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4792 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4793 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4794
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4795 hueStopPositions.push(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4796 hueStopHsl.push(hslText(hueEnd));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4797 hueStopText.push(round(valueEnd));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4798 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4799
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4800 function keyLineAngle(angle, keyAngle, bendRadius, keyX, keyY, pointsX, pointsY)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4801 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4802 if ( angle < Math.PI / 2 && keyY < bendRadius * Math.sin(angle)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4803 || angle > Math.PI / 2 && keyY < bendRadius)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4804 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4805 return Math.asin(keyY / bendRadius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4806 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4807 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4808 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4809 // find the angle of the normal to a tangent line that goes to
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4810 // the label
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4811
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4812 var textDist = Math.sqrt
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4813 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4814 Math.pow(keyX, 2) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4815 Math.pow(keyY, 2)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4816 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4817
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4818 var tanAngle = Math.acos(bendRadius / textDist) + keyAngle;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4819
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4820 if ( angle < tanAngle || angle < Math.PI / 2 )//|| labelLeft < centerX )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4821 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4822 // angle doesn't reach far enough for tangent; collapse and
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4823 // connect directly to label
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4824
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4825 if ( keyY / Math.tan(angle) > 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4826 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4827 pointsX.push(keyY / Math.tan(angle));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4828 pointsY.push(keyY);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4829 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4830 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4831 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4832 pointsX.push(bendRadius * Math.cos(angle));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4833 pointsY.push(bendRadius * Math.sin(angle));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4834 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4835
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4836 return angle;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4837 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4838 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4839 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4840 return tanAngle;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4841 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4842 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4843 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4844
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4845 function keyOffset()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4846 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4847 return imageHeight - (keys - currentKey + 1) * (keySize + keyBuffer) + keyBuffer - margin;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4848 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4849
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4850 function lerp(value, fromStart, fromEnd, toStart, toEnd)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4851 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4852 return (value - fromStart) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4853 (toEnd - toStart) /
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4854 (fromEnd - fromStart) +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4855 toStart;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4856 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4857
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4858 function createCanvas()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4859 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4860 canvas = document.createElement('canvas');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4861 document.body.appendChild(canvas);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4862 context = canvas.getContext('2d');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4863 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4864
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4865 function load()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4866 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4867 document.body.style.overflow = "hidden";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4868 document.body.style.margin = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4869
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4870 createCanvas();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4871
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4872 if ( context == undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4873 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4874 document.body.innerHTML = '\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4875 <br/>This browser does not support HTML5 (see \
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
4876 <a href="https://github.com/marbl/Krona/wiki/Browser%20support">Browser support</a>).\
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4877 ';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4878 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4879 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4880
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4881 if ( typeof context.fillText != 'function' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4882 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4883 document.body.innerHTML = '\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4884 <br/>This browser does not support HTML5 canvas text (see \
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
4885 <a href="https://github.com/marbl/Krona/wiki/Browser%20support">Browser support</a>).\
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4886 ';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4887 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4888 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4889
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4890 resize();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4891
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4892 var kronaElement = document.getElementsByTagName('krona')[0];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4893
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4894 var magnitudeName;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4895 var hueName;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4896 var hueDefault;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4897 var hueStart;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4898 var hueEnd;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4899 var valueStart;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4900 var valueEnd;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4901
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4902 if ( kronaElement.getAttribute('collapse') != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4903 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4904 collapse = kronaElement.getAttribute('collapse') == 'true';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4905 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4906
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4907 if ( kronaElement.getAttribute('key') != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4908 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4909 showKeys = kronaElement.getAttribute('key') == 'true';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4910 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4911
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4912 for
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4913 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4914 var element = getFirstChild(kronaElement);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4915 element;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4916 element = getNextSibling(element)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4917 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4918 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4919 switch ( element.tagName.toLowerCase() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4920 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4921 case 'attributes':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4922 magnitudeName = element.getAttribute('magnitude');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4923 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4924 for
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4925 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4926 var attributeElement = getFirstChild(element);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4927 attributeElement;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4928 attributeElement = getNextSibling(attributeElement)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4929 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4930 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4931 var tag = attributeElement.tagName.toLowerCase();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4932
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4933 if ( tag == 'attribute' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4934 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4935 var attribute = new Attribute();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4936 attribute.name = attributeElement.firstChild.nodeValue.toLowerCase();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4937 attribute.displayName = attributeElement.getAttribute('display');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4938
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4939 if ( attributeElement.getAttribute('hrefBase') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4940 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4941 attribute.hrefBase = attributeElement.getAttribute('hrefBase');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4942 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4943
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4944 if ( attributeElement.getAttribute('target') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4945 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4946 attribute.target = attributeElement.getAttribute('target');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4947 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4948
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4949 if ( attribute.name == magnitudeName )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4950 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4951 magnitudeIndex = attributes.length;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4952 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4953
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4954 if ( attributeElement.getAttribute('listAll') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4955 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4956 attribute.listAll = attributeElement.getAttribute('listAll').toLowerCase();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4957 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4958 else if ( attributeElement.getAttribute('listNode') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4959 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4960 attribute.listNode = attributeElement.getAttribute('listNode').toLowerCase();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4961 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4962 else if ( attributeElement.getAttribute('dataAll') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4963 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4964 attribute.dataAll = attributeElement.getAttribute('dataAll').toLowerCase();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4965 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4966 else if ( attributeElement.getAttribute('dataNode') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4967 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4968 attribute.dataNode = attributeElement.getAttribute('dataNode').toLowerCase();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4969 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4970
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4971 if ( attributeElement.getAttribute('postUrl') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4972 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4973 attribute.postUrl = attributeElement.getAttribute('postUrl');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4974 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4975
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4976 if ( attributeElement.getAttribute('postVar') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4977 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4978 attribute.postVar = attributeElement.getAttribute('postVar');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4979 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4980
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4981 if ( attributeElement.getAttribute('mono') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4982 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4983 attribute.mono = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4984 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4985
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4986 attributes.push(attribute);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4987 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4988 else if ( tag == 'list' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4989 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4990 var attribute = new Attribute();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4991
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4992 attribute.name = attributeElement.firstChild.nodeValue;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4993 attribute.list = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4994 attributes.push(attribute);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4995 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4996 else if ( tag == 'data' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4997 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4998 var attribute = new Attribute();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
4999
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5000 attribute.name = attributeElement.firstChild.nodeValue;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5001 attribute.data = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5002 attributes.push(attribute);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5003
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5004 var enableScript = document.createElement('script');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5005 var date = new Date();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5006 enableScript.src =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5007 attributeElement.getAttribute('enable') + '?' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5008 date.getTime();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5009 document.body.appendChild(enableScript);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5010 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5011 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5012 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5013
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5014 case 'color':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5015 hueName = element.getAttribute('attribute');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5016 hueStart = Number(element.getAttribute('hueStart')) / 360;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5017 hueEnd = Number(element.getAttribute('hueEnd')) / 360;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5018 valueStart = Number(element.getAttribute('valueStart'));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5019 valueEnd = Number(element.getAttribute('valueEnd'));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5020 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5021 interpolateHue(hueStart, hueEnd, valueStart, valueEnd);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5022 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5023 if ( element.getAttribute('default') == 'true' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5024 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5025 hueDefault = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5026 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5027 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5028
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5029 case 'datasets':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5030 datasetNames = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5031 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5032 for ( j = getFirstChild(element); j; j = getNextSibling(j) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5033 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5034 datasetNames.push(j.firstChild.nodeValue);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5035 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5036 datasets = datasetNames.length;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5037 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5038
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5039 case 'node':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5040 head = loadTreeDOM
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5041 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5042 element,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5043 magnitudeName,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5044 hueName,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5045 hueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5046 hueEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5047 valueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5048 valueEnd
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5049 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5050 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5051 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5052 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5053
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5054 // get GET options
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5055 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5056 var urlHalves = String(document.location).split('?');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5057 var datasetDefault = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5058 var maxDepthDefault;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5059 var nodeDefault = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5060 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5061 if ( urlHalves[1] )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5062 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5063 var vars = urlHalves[1].split('&');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5064
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5065 for ( i = 0; i < vars.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5066 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5067 var pair = vars[i].split('=');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5068
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5069 switch ( pair[0] )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5070 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5071 case 'collapse':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5072 collapse = pair[1] == 'true';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5073 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5074
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5075 case 'color':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5076 hueDefault = pair[1] == 'true';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5077 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5078
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5079 case 'dataset':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5080 datasetDefault = Number(pair[1]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5081 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5082
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5083 case 'depth':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5084 maxDepthDefault = Number(pair[1]) + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5085 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5086
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5087 case 'key':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5088 showKeys = pair[1] == 'true';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5089 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5090
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5091 case 'font':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5092 fontSize = Number(pair[1]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5093 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5094
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5095 case 'node':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5096 nodeDefault = Number(pair[1]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5097 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5098
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5099 default:
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5100 getVariables.push(pair[0] + '=' + pair[1]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5101 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5102 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5103 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5104 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5105
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5106 addOptionElements(hueName, hueDefault);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5107 setCallBacks();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5108
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5109 head.sort();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5110 maxAbsoluteDepth = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5111 selectDataset(datasetDefault);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5112
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5113 if ( maxDepthDefault && maxDepthDefault < head.maxDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5114 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5115 maxAbsoluteDepth = maxDepthDefault;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5116 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5117 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5118 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5119 maxAbsoluteDepth = head.maxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5120 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5121
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5122 selectNode(nodes[nodeDefault]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5123
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5124 setInterval(update, 20);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5125
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5126 window.onresize = handleResize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5127 updateMaxAbsoluteDepth();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5128 updateViewNeeded = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5129 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5130
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5131 function loadTreeDOM
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5132 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5133 domNode,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5134 magnitudeName,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5135 hueName,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5136 hueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5137 hueEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5138 valueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5139 valueEnd
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5140 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5141 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5142 var newNode = new Node();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5143
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5144 newNode.name = domNode.getAttribute('name');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5145
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5146 if ( domNode.getAttribute('href') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5147 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5148 newNode.href = domNode.getAttribute('href');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5149 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5150
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5151 if ( hueName )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5152 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5153 newNode.hues = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5154 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5155
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5156 for ( var i = getFirstChild(domNode); i; i = getNextSibling(i) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5157 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5158 switch ( i.tagName.toLowerCase() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5159 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5160 case 'node':
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5161 var newChild = loadTreeDOM
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5162 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5163 i,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5164 magnitudeName,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5165 hueName,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5166 hueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5167 hueEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5168 valueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5169 valueEnd
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5170 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5171 newChild.parent = newNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5172 newNode.children.push(newChild);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5173 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5174
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5175 default:
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5176 var attributeName = i.tagName.toLowerCase();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5177 var index = attributeIndex(attributeName);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5178 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5179 newNode.attributes[index] = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5180 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5181 for ( var j = getFirstChild(i); j; j = getNextSibling(j) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5182 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5183 if ( attributes[index] == undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5184 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5185 var x = 5;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5186 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5187 if ( attributes[index].list )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5188 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5189 newNode.attributes[index].push(new Array());
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5190
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5191 for ( var k = getFirstChild(j); k; k = getNextSibling(k) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5192 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5193 newNode.attributes[index][newNode.attributes[index].length - 1].push(k.firstChild.nodeValue);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5194 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5195 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5196 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5197 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5198 var value = j.firstChild ? j.firstChild.nodeValue : '';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5199
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5200 if ( j.getAttribute('href') )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5201 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5202 var target;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5203
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5204 if ( attributes[index].target )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5205 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5206 target = ' target="' + attributes[index].target + '"';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5207 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5208
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5209 value = '<a href="' + attributes[index].hrefBase + j.getAttribute('href') + '"' + target + '>' + value + '</a>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5210 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5211
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5212 newNode.attributes[index].push(value);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5213 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5214 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5215 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5216 if ( attributeName == magnitudeName || attributeName == hueName )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5217 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5218 for ( j = 0; j < datasets; j++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5219 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5220 var value = newNode.attributes[index][j] == undefined ? 0 : Number(newNode.attributes[index][j]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5221
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5222 newNode.attributes[index][j] = value;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5223
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5224 if ( attributeName == hueName )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5225 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5226 var hue = lerp
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5227 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5228 value,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5229 valueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5230 valueEnd,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5231 hueStart,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5232 hueEnd
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5233 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5234
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5235 if ( hue < hueStart == hueStart < hueEnd )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5236 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5237 hue = hueStart;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5238 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5239 else if ( hue > hueEnd == hueStart < hueEnd )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5240 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5241 hue = hueEnd;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5242 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5243
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5244 newNode.hues[j] = hue;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5245 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5246 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5247
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5248 if ( attributeName == hueName )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5249 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5250 newNode.hue = new Tween(newNode.hues[0], newNode.hues[0]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5251 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5252 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5253 break;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5254 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5255 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5256
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5257 return newNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5258 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5259
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5260 function maxAbsoluteDepthDecrease()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5261 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5262 if ( maxAbsoluteDepth > 2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5263 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5264 maxAbsoluteDepth--;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5265 head.setMaxDepths();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5266 handleResize();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5267 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5268 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5269
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5270 function maxAbsoluteDepthIncrease()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5271 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5272 if ( maxAbsoluteDepth < head.maxDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5273 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5274 maxAbsoluteDepth++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5275 head.setMaxDepths();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5276 handleResize();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5277 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5278 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5279
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5280 function measureText(text, bold)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5281 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5282 context.font = bold ? fontBold : fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5283 var dim = context.measureText(text);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5284 return dim.width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5285 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5286
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5287 function min(a, b)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5288 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5289 return a < b ? a : b;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5290 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5291
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5292 function minWidth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5293 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5294 // Min wedge width (at center) for displaying a node (or for displaying a
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5295 // label if it's at the highest level being viewed, multiplied by 2 to make
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5296 // further calculations simpler
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5297
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5298 return (fontSize * 2.3);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5299 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5300
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5301 function mouseMove(e)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5302 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5303 mouseX = e.pageX;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5304 mouseY = e.pageY - headerHeight;
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
5305 mouseXRel = (mouseX - centerX) * backingScale()
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
5306 mouseYRel = (mouseY - centerY) * backingScale()
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5307
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5308 if ( head && ! quickLook )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5309 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5310 checkHighlight();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5311 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5312 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5313
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5314 function mouseClick(e)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5315 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5316 if ( highlightedNode == focusNode && focusNode != selectedNode || selectedNode.hasParent(highlightedNode) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5317 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5318 if ( highlightedNode.hasChildren() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5319 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5320 expand(highlightedNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5321 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5322 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5323 else if ( progress == 1 )//( highlightedNode != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5324 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5325 setFocus(highlightedNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5326 // document.body.style.cursor='ew-resize';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5327 draw();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5328 checkHighlight();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5329 var date = new Date();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5330 mouseDownTime = date.getTime();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5331 mouseDown = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5332 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5333 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5334
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5335 function mouseUp(e)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5336 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5337 if ( quickLook )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5338 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5339 navigateBack();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5340 quickLook = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5341 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5342
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5343 mouseDown = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5344 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5345
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5346 function navigateBack()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5347 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5348 if ( nodeHistoryPosition > 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5349 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5350 nodeHistory[nodeHistoryPosition] = selectedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5351 nodeHistoryPosition--;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5352
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5353 if ( nodeHistory[nodeHistoryPosition].collapse )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5354 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5355 collapseCheckBox.checked = collapse = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5356 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5357
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5358 setSelectedNode(nodeHistory[nodeHistoryPosition]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5359 updateDatasetButtons();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5360 updateView();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5361 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5362 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5363
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5364 function navigateUp()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5365 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5366 if ( selectedNode.getParent() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5367 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5368 selectNode(selectedNode.getParent());
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5369 updateView();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5370 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5371 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5372
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5373 function navigateForward()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5374 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5375 if ( nodeHistoryPosition < nodeHistory.length - 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5376 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5377 nodeHistoryPosition++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5378 var newNode = nodeHistory[nodeHistoryPosition];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5379
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5380 if ( newNode.collapse )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5381 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5382 collapseCheckBox.checked = collapse = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5383 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5384
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5385 if ( nodeHistoryPosition == nodeHistory.length - 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5386 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5387 // this will ensure the forward button is disabled
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5388
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5389 nodeHistory.length = nodeHistoryPosition;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5390 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5391
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5392 setSelectedNode(newNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5393 updateDatasetButtons();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5394 updateView();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5395 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5396 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5397
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5398 function nextDataset()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5399 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5400 var newDataset = currentDataset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5401
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5402 do
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5403 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5404 if ( newDataset == datasets - 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5405 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5406 newDataset = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5407 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5408 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5409 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5410 newDataset++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5411 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5412 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5413 while ( datasetDropDown.options[newDataset].disabled )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5414
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5415 selectDataset(newDataset);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5416 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5417
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5418 function onDatasetChange()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5419 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5420 selectDataset(datasetDropDown.selectedIndex);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5421 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5422
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5423 function onKeyDown(event)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5424 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5425 if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5426 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5427 event.keyCode == 37 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5428 document.activeElement.id != 'search' &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5429 document.activeElement.id != 'linkText'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5430 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5431 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5432 navigateBack();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5433 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5434 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5435 else if
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5436 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5437 event.keyCode == 39 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5438 document.activeElement.id != 'search' &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5439 document.activeElement.id != 'linkText'
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5440 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5441 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5442 navigateForward();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5443 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5444 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5445 else if ( event.keyCode == 38 && datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5446 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5447 prevDataset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5448
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5449 //if ( document.activeElement.id == 'datasets' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5450 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5451 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5452 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5453 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5454 else if ( event.keyCode == 40 && datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5455 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5456 nextDataset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5457
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5458 //if ( document.activeElement.id == 'datasets' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5459 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5460 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5461 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5462 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5463 else if ( event.keyCode == 9 && datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5464 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5465 selectLastDataset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5466 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5467 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5468 else if ( event.keyCode == 83 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5469 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5470 progress += .2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5471 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5472 else if ( event.keyCode == 66 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5473 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5474 progress -= .2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5475 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5476 else if ( event.keyCode == 70 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5477 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5478 progress = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5479 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5480 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5481
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5482 function onKeyPress(event)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5483 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5484 if ( event.keyCode == 38 && datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5485 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5486 // prevDataset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5487
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5488 //if ( document.activeElement.id == 'datasets' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5489 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5490 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5491 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5492 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5493 else if ( event.keyCode == 40 && datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5494 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5495 // nextDataset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5496
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5497 //if ( document.activeElement.id == 'datasets' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5498 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5499 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5500 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5501 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5502 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5503
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5504 function onKeyUp(event)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5505 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5506 if ( event.keyCode == 27 && document.activeElement.id == 'search' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5507 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5508 search.value = '';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5509 onSearchChange();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5510 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5511 else if ( event.keyCode == 38 && datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5512 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5513 // prevDataset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5514
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5515 //if ( document.activeElement.id == 'datasets' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5516 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5517 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5518 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5519 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5520 else if ( event.keyCode == 40 && datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5521 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5522 // nextDataset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5523
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5524 //if ( document.activeElement.id == 'datasets' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5525 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5526 event.preventDefault();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5527 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5528 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5529 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5530
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5531 function onSearchChange()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5532 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5533 nSearchResults = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5534 head.search();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5535
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5536 if ( search.value == '' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5537 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5538 searchResults.innerHTML = '';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5539 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5540 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5541 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5542 searchResults.innerHTML = nSearchResults + ' results';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5543 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5544
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5545 setFocus(selectedNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5546 draw();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5547 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5548
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5549 function post(url, variable, value, postWindow)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5550 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5551 var form = document.createElement('form');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5552 var input = document.createElement('input');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5553 var inputDataset = document.createElement('input');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5554
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5555 form.appendChild(input);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5556 form.appendChild(inputDataset);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5557
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5558 form.method = "POST";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5559 form.action = url;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5560
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5561 if ( postWindow == undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5562 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5563 form.target = '_blank';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5564 postWindow = window;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5565 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5566
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5567 input.type = 'hidden';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5568 input.name = variable;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5569 input.value = value;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5570
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5571 inputDataset.type = 'hidden';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5572 inputDataset.name = 'dataset';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5573 inputDataset.value = currentDataset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5574
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5575 postWindow.document.body.appendChild(form);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5576 form.submit();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5577 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5578
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5579 function prevDataset()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5580 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5581 var newDataset = currentDataset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5582
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5583 do
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5584 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5585 if ( newDataset == 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5586 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5587 newDataset = datasets - 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5588 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5589 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5590 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5591 newDataset--;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5592 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5593 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5594 while ( datasetDropDown.options[newDataset].disabled );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5595
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5596 selectDataset(newDataset);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5597 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5598
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5599 function radiusDecrease()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5600 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5601 if ( bufferFactor < .309 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5602 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5603 bufferFactor += .03;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5604 updateViewNeeded = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5605 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5606 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5607
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5608 function radiusIncrease()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5609 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5610 if ( bufferFactor > .041 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5611 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5612 bufferFactor -= .03;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5613 updateViewNeeded = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5614 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5615 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5616
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5617 function resetKeyOffset()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5618 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5619 currentKey = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5620 keyMinTextLeft = centerX + gRadius + buffer - buffer / (keys + 1) / 2 + fontSize / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5621 keyMinAngle = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5622 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5623
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5624 function rgbText(r, g, b)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5625 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5626 var rgbArray =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5627 [
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5628 "rgb(",
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5629 Math.floor(r),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5630 ",",
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5631 Math.floor(g),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5632 ",",
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5633 Math.floor(b),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5634 ")"
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5635 ];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5636
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5637 return rgbArray.join('');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5638 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5639
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5640 function round(number)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5641 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5642 if ( number >= 1 || number <= -1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5643 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5644 return number.toFixed(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5645 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5646 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5647 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5648 return number.toPrecision(1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5649 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5650 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5651
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5652 function roundedRectangle(x, y, width, height, radius)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5653 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5654 if ( radius * 2 > width )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5655 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5656 radius = width / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5657 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5658
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5659 if ( radius * 2 > height )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5660 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5661 radius = height / 2;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5662 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5663
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5664 context.beginPath();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5665 context.arc(x + radius, y + radius, radius, Math.PI, Math.PI * 3 / 2, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5666 context.lineTo(x + width - radius, y);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5667 context.arc(x + width - radius, y + radius, radius, Math.PI * 3 / 2, Math.PI * 2, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5668 context.lineTo(x + width, y + height - radius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5669 context.arc(x + width - radius, y + height - radius, radius, 0, Math.PI / 2, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5670 context.lineTo(x + radius, y + height);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5671 context.arc(x + radius, y + height - radius, radius, Math.PI / 2, Math.PI, false);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5672 context.lineTo(x, y + radius);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5673 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5674
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5675 function passClick(e)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5676 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5677 mouseClick(e);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5678 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5679
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5680 function searchResultString(results)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5681 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5682 var searchResults = this.searchResults;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5683
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5684 if ( this.isSearchResult )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5685 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5686 // don't count ourselves
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5687 searchResults--;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5688 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5689
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5690 return ' - ' + results + (results > 1 ? ' results' : ' result');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5691 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5692
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5693 function setCallBacks()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5694 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5695 canvas.onselectstart = function(){return false;} // prevent unwanted highlighting
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5696 options.onselectstart = function(){return false;} // prevent unwanted highlighting
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5697 document.onmousemove = mouseMove;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5698 window.onblur = focusLost;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5699 window.onmouseout = focusLost;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5700 document.onkeyup = onKeyUp;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5701 document.onkeydown = onKeyDown;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5702 canvas.onmousedown = mouseClick;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5703 document.onmouseup = mouseUp;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5704 keyControl.onclick = toggleKeys;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5705 collapseCheckBox = document.getElementById('collapse');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5706 collapseCheckBox.checked = collapse;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5707 collapseCheckBox.onclick = handleResize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5708 collapseCheckBox.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5709 maxAbsoluteDepthText = document.getElementById('maxAbsoluteDepth');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5710 maxAbsoluteDepthButtonDecrease = document.getElementById('maxAbsoluteDepthDecrease');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5711 maxAbsoluteDepthButtonIncrease = document.getElementById('maxAbsoluteDepthIncrease');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5712 maxAbsoluteDepthButtonDecrease.onclick = maxAbsoluteDepthDecrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5713 maxAbsoluteDepthButtonIncrease.onclick = maxAbsoluteDepthIncrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5714 maxAbsoluteDepthButtonDecrease.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5715 maxAbsoluteDepthButtonIncrease.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5716 fontSizeText = document.getElementById('fontSize');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5717 fontSizeButtonDecrease = document.getElementById('fontSizeDecrease');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5718 fontSizeButtonIncrease = document.getElementById('fontSizeIncrease');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5719 fontSizeButtonDecrease.onclick = fontSizeDecrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5720 fontSizeButtonIncrease.onclick = fontSizeIncrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5721 fontSizeButtonDecrease.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5722 fontSizeButtonIncrease.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5723 radiusButtonDecrease = document.getElementById('radiusDecrease');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5724 radiusButtonIncrease = document.getElementById('radiusIncrease');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5725 radiusButtonDecrease.onclick = radiusDecrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5726 radiusButtonIncrease.onclick = radiusIncrease;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5727 radiusButtonDecrease.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5728 radiusButtonIncrease.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5729 maxAbsoluteDepth = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5730 backButton = document.getElementById('back');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5731 backButton.onclick = navigateBack;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5732 backButton.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5733 forwardButton = document.getElementById('forward');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5734 forwardButton.onclick = navigateForward;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5735 forwardButton.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5736 snapshotButton = document.getElementById('snapshot');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5737 snapshotButton.onclick = snapshot;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5738 snapshotButton.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5739 detailsName = document.getElementById('detailsName');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5740 detailsExpand = document.getElementById('detailsExpand');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5741 detailsInfo = document.getElementById('detailsInfo');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5742 search = document.getElementById('search');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5743 search.onkeyup = onSearchChange;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5744 search.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5745 searchResults = document.getElementById('searchResults');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5746 useHueDiv = document.getElementById('useHueDiv');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5747 linkButton = document.getElementById('linkButton');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5748 linkButton.onclick = showLink;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5749 linkButton.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5750 linkText = document.getElementById('linkText');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5751 linkText.onblur = hideLink;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5752 linkText.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5753 hide(linkText);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5754 var helpButton = document.getElementById('help');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5755 helpButton.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5756 var searchClear = document.getElementById('searchClear');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5757 searchClear.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5758 if ( datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5759 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5760 datasetDropDown.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5761 var prevDatasetButton = document.getElementById('prevDataset');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5762 prevDatasetButton.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5763 var nextDatasetButton = document.getElementById('nextDataset');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5764 nextDatasetButton.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5765 var lastDatasetButton = document.getElementById('lastDataset');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5766 lastDatasetButton.onmousedown = suppressEvent;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5767 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5768
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5769 image = document.getElementById('hiddenImage');
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
5770 image.onload = function()
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5771 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5772 hiddenPattern = context.createPattern(image, 'repeat');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5773 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5774
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5775 var loadingImageElement = document.getElementById('loadingImage');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5776
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5777 if ( loadingImageElement )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5778 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5779 loadingImage = loadingImageElement.src;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5780 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5781 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5782
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5783 function selectDataset(newDataset)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5784 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5785 lastDataset = currentDataset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5786 currentDataset = newDataset
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5787 if ( datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5788 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5789 datasetDropDown.selectedIndex = currentDataset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5790 updateDatasetButtons();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5791 datasetAlpha.start = 1.5;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5792 datasetChanged = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5793 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5794 head.setMagnitudes(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5795 head.setDepth(1, 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5796 head.setMaxDepths();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5797 handleResize();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5798 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5799
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5800 function selectLastDataset()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5801 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5802 selectDataset(lastDataset);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5803 handleResize();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5804 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5805
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5806 function selectNode(newNode)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5807 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5808 if ( selectedNode != newNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5809 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5810 // truncate history at current location to create a new branch
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5811 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5812 nodeHistory.length = nodeHistoryPosition;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5813
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5814 if ( selectedNode != 0 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5815 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5816 nodeHistory.push(selectedNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5817 nodeHistoryPosition++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5818 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5819
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5820 setSelectedNode(newNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5821 //updateView();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5822 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5823
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5824 updateDatasetButtons();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5825 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5826
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5827 function setFocus(node)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5828 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5829 if ( node == focusNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5830 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5831 // return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5832 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5833
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5834 focusNode = node;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5835
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5836 if ( node.href )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5837 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5838 detailsName.innerHTML =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5839 '<a target="_blank" href="' + node.href + '">' + node.name + '</a>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5840 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5841 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5842 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5843 detailsName.innerHTML = node.name;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5844 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5845
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5846 var table = '<table>';
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
5847 //TODO: use CSS margins instead of an additional column
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
5848 table += '<tr><td></td><td></td></tr>';
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5849
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5850 for ( var i = 0; i < node.attributes.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5851 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5852 if ( attributes[i].displayName && node.attributes[i] != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5853 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5854 var index = node.attributes[i].length == 1 && attributes[i].mono ? 0 : currentDataset;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5855
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5856 if ( typeof node.attributes[i][currentDataset] == 'number' || node.attributes[i][index] != undefined && node.attributes[i][currentDataset] != '' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5857 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5858 var value = node.attributes[i][index];
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5859
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5860 if ( attributes[i].listNode != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5861 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5862 value =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5863 '<a href="" onclick="showList(' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5864 attributeIndex(attributes[i].listNode) + ',' + i +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5865 ',false);return false;" title="Show list">' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5866 value + '</a>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5867 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5868 else if ( attributes[i].listAll != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5869 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5870 value =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5871 '<a href="" onclick="showList(' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5872 attributeIndex(attributes[i].listAll) + ',' + i +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5873 ',true);return false;" title="Show list">' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5874 value + '</a>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5875 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5876 else if ( attributes[i].dataNode != undefined && dataEnabled )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5877 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5878 value =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5879 '<a href="" onclick="showData(' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5880 attributeIndex(attributes[i].dataNode) + ',' + i +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5881 ',false);return false;" title="Show data">' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5882 value + '</a>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5883 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5884 else if ( attributes[i].dataAll != undefined && dataEnabled )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5885 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5886 value =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5887 '<a href="" onclick="showData(' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5888 attributeIndex(attributes[i].dataAll) + ',' + i +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5889 ',true);return false;" title="Show data">' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5890 value + '</a>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5891 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5892
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5893 table +=
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5894 '<tr><td><strong>' + attributes[i].displayName + ':</strong></td><td>' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5895 value + '</td></tr>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5896 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5897 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5898 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5899
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5900 table += '</table>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5901 detailsInfo.innerHTML = table;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5902
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5903 detailsExpand.disabled = !focusNode.hasChildren() || focusNode == selectedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5904 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5905
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5906 function setSelectedNode(newNode)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5907 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5908 if ( selectedNode && selectedNode.hasParent(newNode) )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5909 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5910 zoomOut = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5911 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5912 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5913 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5914 zoomOut = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5915 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5916
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5917 selectedNodeLast = selectedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5918 selectedNode = newNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5919
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5920 //if ( focusNode != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5921 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5922 setFocus(selectedNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5923 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5924 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5925
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5926 function waitForData(dataWindow, target, title, time, postUrl, postVar)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5927 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5928 if ( nodeData.length == target )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5929 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5930 if ( postUrl != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5931 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5932 for ( var i = 0; i < nodeData.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5933 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5934 nodeData[i] = nodeData[i].replace(/\n/g, ',');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5935 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5936
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5937 var postString = nodeData.join('');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5938 postString = postString.slice(0, -1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5939
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5940 dataWindow.document.body.removeChild(dataWindow.document.getElementById('loading'));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5941 document.body.removeChild(document.getElementById('data'));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5942
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5943 post(postUrl, postVar, postString, dataWindow);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5944 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5945 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5946 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5947 //dataWindow.document.body.removeChild(dataWindow.document.getElementById('loading'));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5948 //document.body.removeChild(document.getElementById('data'));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5949
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5950 dataWindow.document.open();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5951 dataWindow.document.write('<pre>' + nodeData.join('') + '</pre>');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5952 dataWindow.document.close();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5953 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5954
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5955 dataWindow.document.title = title; // replace after document.write()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5956 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5957 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5958 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5959 var date = new Date();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5960
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5961 if ( date.getTime() - time > 10000 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5962 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5963 dataWindow.document.body.removeChild(dataWindow.document.getElementById('loading'));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5964 document.body.removeChild(document.getElementById('data'));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5965 dataWindow.document.body.innerHTML =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5966 'Timed out loading supplemental files for:<br/>' + document.location;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5967 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5968 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5969 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5970 setTimeout(function() {waitForData(dataWindow, target, title, time, postUrl, postVar);}, 100);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5971 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5972 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5973 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5974
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5975 function data(newData)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5976 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5977 nodeData.push(newData);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5978 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5979
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5980 function enableData()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5981 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5982 dataEnabled = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5983 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5984
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5985 function showData(indexData, indexAttribute, summary)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5986 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5987 var dataWindow = window.open('', '_blank');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5988 var title = 'Krona - ' + attributes[indexAttribute].displayName + ' - ' + focusNode.name;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5989 dataWindow.document.title = title;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5990
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5991 nodeData = new Array();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5992
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5993 if ( dataWindow && dataWindow.document && dataWindow.document.body != null )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5994 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5995 //var loadImage = document.createElement('img');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5996 //loadImage.src = "file://localhost/Users/ondovb/Krona/KronaTools/img/loading.gif";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5997 //loadImage.id = "loading";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5998 //loadImage.alt = "Loading...";
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
5999 //dataWindow.document.body.appendChild(loadImage);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6000 dataWindow.document.body.innerHTML =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6001 '<img id="loading" src="' + loadingImage + '" alt="Loading..."></img>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6002 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6003
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6004 var scripts = document.createElement('div');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6005 scripts.id = 'data';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6006 document.body.appendChild(scripts);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6007
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6008 var files = focusNode.getData(indexData, summary);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6009
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6010 var date = new Date();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6011 var time = date.getTime();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6012
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6013 for ( var i = 0; i < files.length; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6014 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6015 var script = document.createElement('script');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6016 script.src = files[i] + '?' + time;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6017 scripts.appendChild(script);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6018 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6019
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6020 waitForData(dataWindow, files.length, title, time, attributes[indexAttribute].postUrl, attributes[indexAttribute].postVar);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6021
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6022 return false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6023 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6024
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6025 function showList(indexList, indexAttribute, summary)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6026 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6027 var list = focusNode.getList(indexList, summary);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6028
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6029 if ( attributes[indexAttribute].postUrl != undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6030 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6031 post(attributes[indexAttribute].postUrl, attributes[indexAttribute].postVar, list.join(','));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6032 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6033 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6034 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6035 var dataWindow = window.open('', '_blank');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6036
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6037 if ( true || navigator.appName == 'Microsoft Internet Explorer' ) // :(
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6038 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6039 dataWindow.document.open();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6040 dataWindow.document.write('<pre>' + list.join('\n') + '</pre>');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6041 dataWindow.document.close();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6042 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6043 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6044 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6045 var pre = document.createElement('pre');
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6046 dataWindow.document.body.appendChild(pre);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6047 pre.innerHTML = list;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6048 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6049
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6050 dataWindow.document.title = 'Krona - ' + attributes[indexAttribute].displayName + ' - ' + focusNode.name;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6051 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6052 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6053
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6054 function snapshot()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6055 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6056 svg = svgHeader();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6057
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6058 resetKeyOffset();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6059
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6060 snapshotMode = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6061
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6062 selectedNode.draw(false, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6063 selectedNode.draw(true, true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6064
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6065 if ( focusNode != 0 && focusNode != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6066 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6067 context.globalAlpha = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6068 focusNode.drawHighlight(true);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6069 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6070
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6071 if ( hueDisplayName && useHue() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6072 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6073 drawLegendSVG();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6074 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6075
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6076 snapshotMode = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6077
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6078 svg += svgFooter();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6079
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6080 var snapshotWindow = window.open('', '_blank', '', 'replace=false');
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6081 snapshotWindow.document.write('<html><body><a href="data:image/svg+xml,' + encodeURIComponent(svg) + '" download="snapshot.svg">Download Snapshot</a></html></body>');
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6082 snapshotWindow.document.write(svg);
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6083 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6084
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6085 function save()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6086 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6087 alert(document.body.innerHTML);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6088 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6089
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6090 function spacer()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6091 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6092 if ( snapshotMode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6093 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6094 return '&#160;&#160;&#160;';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6095 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6096 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6097 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6098 return ' ';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6099 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6100 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6101
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6102 function suppressEvent(e)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6103 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6104 e.cancelBubble = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6105 if (e.stopPropagation) e.stopPropagation();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6106 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6107
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6108 function svgFooter()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6109 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6110 return '</svg>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6111 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6112
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6113 function svgHeader()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6114 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6115 var patternWidth = fontSize * .6;//radius / 50;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6116
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6117 return '\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6118 <?xml version="1.0" standalone="no"?>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6119 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" \
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6120 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6121 <svg width="' + imageWidth + '" height="' + imageHeight + '" version="1.1"\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6122 xmlns="http://www.w3.org/2000/svg">\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6123 <title>Krona (snapshot) - ' +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6124 (datasets > 1 ? datasetNames[currentDataset] + ' - ' : '') + selectedNode.name +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6125 '</title>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6126 <defs>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6127 <style type="text/css">\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6128 text {font-size: ' + fontSize + 'px; font-family: ' + fontFamily + '; dominant-baseline:central}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6129 path {stroke-width:' + thinLineWidth * fontSize / 12 + ';}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6130 path.wedge {stroke:none}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6131 path.line {fill:none;stroke:black;}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6132 line {stroke:black;stroke-width:' + thinLineWidth * fontSize / 12 + ';}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6133 line.tick {stroke-width:' + thinLineWidth * fontSize / 6 + ';}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6134 line.pattern {stroke-width:' + thinLineWidth * fontSize / 18 + ';}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6135 circle {fill:none;stroke:black;stroke-width:' + thinLineWidth * fontSize / 12 + ';}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6136 rect {stroke:black;stroke-width:' + thinLineWidth * fontSize / 12 + ';}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6137 .highlight {stroke:black;stroke-width:'+ highlightLineWidth * fontSize / 12 + ';}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6138 .searchHighlight {fill:rgb(255, 255, 100);stroke:none;}\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6139 </style>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6140 <pattern id="hiddenPattern" patternUnits="userSpaceOnUse" \
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6141 x="0" y="0" width="' + patternWidth + '" height="' + patternWidth + '">\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6142 <line class="pattern" x1="0" y1="0" x2="' + patternWidth / 2 + '" y2="' + patternWidth / 2 + '"/>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6143 <line class="pattern" x1="' + patternWidth / 2 + '" y1="' + patternWidth +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6144 '" x2="' + patternWidth + '" y2="' + patternWidth / 2 + '"/>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6145 </pattern>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6146 </defs>\
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6147 ';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6148 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6149
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6150 function svgText(text, x, y, anchor, bold, color)
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6151 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6152 if ( typeof(anchor) == 'undefined' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6153 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6154 anchor = 'start';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6155 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6156
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6157 if ( color == undefined )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6158 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6159 color = 'black';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6160 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6161
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6162 return '<text x="' + x + '" y="' + y +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6163 '" style="font-color:' + color + ';font-weight:' + (bold ? 'bold' : 'normal') +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6164 '" text-anchor="' + anchor + '">' + text + '</text>';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6165 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6166
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6167 function toggleKeys()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6168 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6169 if ( showKeys )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6170 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6171 keyControl.value = '…';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6172 showKeys = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6173 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6174 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6175 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6176 keyControl.value = 'x';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6177 showKeys = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6178 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6179
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6180 updateKeyControl();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6181
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6182 if ( progress == 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6183 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6184 draw();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6185 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6186 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6187
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6188 function update()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6189 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6190 if ( ! head )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6191 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6192 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6193 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6194
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6195 if ( mouseDown && focusNode != selectedNode )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6196 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6197 var date = new Date();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6198
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6199 if ( date.getTime() - mouseDownTime > quickLookHoldLength )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6200 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6201 if ( focusNode.hasChildren() )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6202 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6203 expand(focusNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6204 quickLook = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6205 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6206 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6207 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6208
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6209 if ( updateViewNeeded )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6210 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6211 resize();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6212 mouseX = -1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6213 mouseY = -1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6214
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6215 collapse = collapseCheckBox.checked;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6216 compress = true;//compressCheckBox.checked;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6217 shorten = true;//shortenCheckBox.checked;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6218
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6219 checkSelectedCollapse();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6220 updateMaxAbsoluteDepth();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6221
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6222 if ( focusNode.getCollapse() || focusNode.depth > maxAbsoluteDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6223 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6224 setFocus(selectedNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6225 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6226 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6227 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6228 setFocus(focusNode);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6229 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6230
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6231 updateView();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6232
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6233 updateViewNeeded = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6234 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6235
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6236 var date = new Date();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6237 progress = (date.getTime() - tweenStartTime) / tweenLength;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6238 // progress += .01;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6239
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6240 if ( progress >= 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6241 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6242 progress = 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6243 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6244
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6245 if ( progress != progressLast )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6246 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6247 tweenFactor =// progress;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6248 (1 / (1 + Math.exp(-tweenCurvature * (progress - .5))) - .5) /
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6249 (tweenMax - .5) / 2 + .5;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6250
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6251 if ( progress == 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6252 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6253 snapshotButton.disabled = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6254 zoomOut = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6255
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6256 //updateKeyControl();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6257
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6258 if ( ! quickLook )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6259 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6260 //checkHighlight();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6261 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6262
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6263
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6264 if ( fpsDisplay )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6265 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6266 fpsDisplay.innerHTML = 'fps: ' + Math.round(tweenFrames * 1000 / tweenLength);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6267 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6268 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6269
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6270 draw();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6271 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6272
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6273 progressLast = progress;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6274 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6275
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6276 function updateDatasetButtons()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6277 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6278 if ( datasets == 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6279 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6280 return;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6281 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6282
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6283 var node = selectedNode ? selectedNode : head;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6284
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6285 datasetButtonLast.disabled =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6286 node.attributes[magnitudeIndex][lastDataset] == 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6287
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6288 datasetButtonPrev.disabled = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6289 datasetButtonNext.disabled = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6290
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6291 for ( var i = 0; i < datasets; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6292 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6293 var disable = node.attributes[magnitudeIndex][i] == 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6294
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6295 datasetDropDown.options[i].disabled = disable;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6296
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6297 if ( ! disable )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6298 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6299 if ( i != currentDataset )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6300 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6301 datasetButtonPrev.disabled = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6302 datasetButtonNext.disabled = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6303 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6304 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6305 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6306 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6307
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6308 function updateDatasetWidths()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6309 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6310 if ( datasets > 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6311 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6312 for ( var i = 0; i < datasets; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6313 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6314 context.font = fontBold;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6315 var dim = context.measureText(datasetNames[i]);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6316 datasetWidths[i] = dim.width;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6317 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6318 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6319 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6320
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6321 function updateKeyControl()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6322 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6323 if ( keys == 0 )//|| progress != 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6324 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6325 keyControl.style.visibility = 'hidden';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6326 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6327 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6328 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6329 keyControl.style.visibility = 'visible';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6330 keyControl.style.right = margin + 'px';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6331
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6332 if ( showKeys )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6333 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6334 keyControl.style.top =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6335 imageHeight -
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6336 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6337 keys * (keySize + keyBuffer) -
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6338 keyBuffer +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6339 margin +
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6340 keyControl.clientHeight * 1.5
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6341 ) + 'px';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6342 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6343 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6344 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6345 keyControl.style.top =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6346 (imageHeight - margin - keyControl.clientHeight) + 'px';
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6347 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6348 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6349 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6350
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6351 function updateView()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6352 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6353 if ( selectedNode.depth > maxAbsoluteDepth - 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6354 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6355 maxAbsoluteDepth = selectedNode.depth + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6356 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6357
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6358 highlightedNode = selectedNode;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6359
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6360 angleFactor = 2 * Math.PI / (selectedNode.magnitude);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6361
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6362 maxPossibleDepth = Math.floor(gRadius / (fontSize * minRingWidthFactor));
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6363
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6364 if ( maxPossibleDepth < 4 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6365 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6366 maxPossibleDepth = 4;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6367 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6368
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6369 var minRadiusInner = fontSize * 8 / gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6370 var minRadiusFirst = fontSize * 6 / gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6371 var minRadiusOuter = fontSize * 5 / gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6372
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6373 if ( .25 < minRadiusInner )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6374 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6375 minRadiusInner = .25;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6376 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6377
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6378 if ( .15 < minRadiusFirst )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6379 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6380 minRadiusFirst = .15;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6381 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6382
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6383 if ( .15 < minRadiusOuter )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6384 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6385 minRadiusOuter = .15;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6386 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6387
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6388 // visibility of nodes depends on the depth they are displayed at,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6389 // so we need to set the max depth assuming they can all be displayed
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6390 // and iterate it down based on the deepest child node we can display
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6391 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6392 var maxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6393 var newMaxDepth = selectedNode.getMaxDepth() - selectedNode.getDepth() + 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6394 //
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6395 do
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6396 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6397 maxDepth = newMaxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6398
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6399 if ( ! compress && maxDepth > maxPossibleDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6400 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6401 maxDepth = maxPossibleDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6402 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6403
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6404 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6405 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6406 compressedRadii = new Array(maxDepth);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6407
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6408 compressedRadii[0] = minRadiusInner;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6409
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6410 var offset = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6411
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6412 while
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6413 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6414 lerp
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6415 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6416 Math.atan(offset + 2),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6417 Math.atan(offset + 1),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6418 Math.atan(maxDepth + offset - 1),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6419 minRadiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6420 1 - minRadiusOuter
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6421 ) - minRadiusInner > minRadiusFirst &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6422 offset < 10
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6423 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6424 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6425 offset++;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6426 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6427
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6428 offset--;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6429
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6430 for ( var i = 1; i < maxDepth; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6431 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6432 compressedRadii[i] = lerp
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6433 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6434 Math.atan(i + offset),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6435 Math.atan(offset),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6436 Math.atan(maxDepth + offset - 1),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6437 minRadiusInner,
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6438 1 - minRadiusOuter
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6439 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6440 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6441 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6442 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6443 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6444 nodeRadius = 1 / maxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6445 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6446
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6447 newMaxDepth = selectedNode.maxVisibleDepth(maxDepth);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6448
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6449 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6450 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6451 if ( newMaxDepth <= maxPossibleDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6452 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6453 // compress
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6454 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6455 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6456 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6457 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6458 if ( newMaxDepth > maxPossibleDepth )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6459 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6460 newMaxDepth = maxPossibleDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6461 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6462 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6463 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6464 while ( newMaxDepth < maxDepth );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6465
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6466 maxDisplayDepth = maxDepth;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6467
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6468 lightnessFactor = (lightnessMax - lightnessBase) / (maxDepth > 8 ? 8 : maxDepth);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6469 keys = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6470
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6471 nLabelOffsets = new Array(maxDisplayDepth - 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6472 labelOffsets = new Array(maxDisplayDepth - 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6473 labelLastNodes = new Array(maxDisplayDepth - 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6474 labelFirstNodes = new Array(maxDisplayDepth - 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6475
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6476 for ( var i = 0; i < maxDisplayDepth - 1; i++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6477 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6478 if ( compress )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6479 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6480 if ( i == maxDisplayDepth - 1 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6481 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6482 nLabelOffsets[i] = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6483 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6484 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6485 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6486 var width =
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6487 (compressedRadii[i + 1] - compressedRadii[i]) *
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6488 gRadius;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6489
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6490 nLabelOffsets[i] = Math.floor(width / fontSize / 1.2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6491
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6492 if ( nLabelOffsets[i] > 2 )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6493 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6494 nLabelOffsets[i] = min
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6495 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6496 Math.floor(width / fontSize / 1.75),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6497 5
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6498 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6499 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6500 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6501 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6502 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6503 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6504 nLabelOffsets[i] = Math.max
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6505 (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6506 Math.floor(Math.sqrt((nodeRadius * gRadius / fontSize)) * 1.5),
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6507 3
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6508 );
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6509 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6510
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6511 labelOffsets[i] = Math.floor((nLabelOffsets[i] - 1) / 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6512 labelLastNodes[i] = new Array(nLabelOffsets[i] + 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6513 labelFirstNodes[i] = new Array(nLabelOffsets[i] + 1);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6514
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6515 for ( var j = 0; j <= nLabelOffsets[i]; j++ )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6516 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6517 // these arrays will allow nodes with neighboring labels to link to
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6518 // each other to determine max label length
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6519
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6520 labelLastNodes[i][j] = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6521 labelFirstNodes[i][j] = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6522 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6523 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6524
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6525 fontSizeText.innerHTML = fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6526 fontNormal = fontSize + 'px ' + fontFamily;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6527 context.font = fontNormal;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6528 fontBold = 'bold ' + fontSize + 'px ' + fontFamily;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6529 tickLength = fontSize * .7;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6530
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6531 head.setTargets(0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6532
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6533 keySize = ((imageHeight - margin * 3) * 1 / 2) / keys * 3 / 4;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6534
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6535 if ( keySize > fontSize * maxKeySizeFactor )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6536 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6537 keySize = fontSize * maxKeySizeFactor;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6538 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6539
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6540 keyBuffer = keySize / 3;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6541
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6542 fontSizeLast = fontSize;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6543
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6544 if ( datasetChanged )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6545 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6546 datasetChanged = false;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6547 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6548 else
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6549 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6550 datasetAlpha.start = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6551 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6552
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6553 var date = new Date();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6554 tweenStartTime = date.getTime();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6555 progress = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6556 tweenFrames = 0;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6557
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6558 updateKeyControl();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6559 updateDatasetWidths();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6560
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6561 document.title = 'Krona - ' + selectedNode.name;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6562 updateNavigationButtons();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6563 snapshotButton.disabled = true;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6564
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6565 maxAbsoluteDepthText.innerHTML = maxAbsoluteDepth - 1;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6566
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6567 maxAbsoluteDepthButtonDecrease.disabled = (maxAbsoluteDepth == 2);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6568 maxAbsoluteDepthButtonIncrease.disabled = (maxAbsoluteDepth == head.maxDepth);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6569
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6570 if ( collapse != collapseLast && search.value != '' )
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6571 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6572 onSearchChange();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6573 collapseLast = collapse;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6574 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6575 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6576
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6577 function updateMaxAbsoluteDepth()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6578 {
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6579 while ( maxAbsoluteDepth > 1 && selectedNode.depth > maxAbsoluteDepth - 1 )
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6580 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6581 selectedNode = selectedNode.getParent();
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6582 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6583 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6584
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6585 function updateNavigationButtons()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6586 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6587 backButton.disabled = (nodeHistoryPosition == 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6588 // upButton.disabled = (selectedNode.getParent() == 0);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6589 forwardButton.disabled = (nodeHistoryPosition == nodeHistory.length);
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6590 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6591
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6592 function useHue()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6593 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6594 return useHueCheckBox && useHueCheckBox.checked;
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6595 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6596 /*
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6597 function zoomOut()
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6598 {
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6599 return (
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6600 selectedNodeLast != 0 &&
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6601 selectedNodeLast.getDepth() < selectedNode.getDepth());
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6602 }
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6603 */
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6604 </script>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6605 </head>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6606 <body>
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6607 <img id="hiddenImage" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oLCBQhNQwWVnsAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAABE0lEQVQYGQEIAff+AwAAABkAAAAAAAAA+gAAAAAAAAAAAAAAAAAAAAAAAAAMAwAAAAAAAAANAAAAAAAAAPoAAAAAAAAADAAAAAYAAAD0AwAAAPoAAAAAAAAAAAAAAPoAAAAMAAAADQAAAPoAAAD6AAAAAAAAAAAAAAAAAAAAAAwAAAAZAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAABkAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAGQAAAAwAAAAAAAAADAAAAAwAAAAABAAAAAAAAAAAAAAA8wAAAPQAAAAAAAAAAAAAAA0AAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAZRssKC5OpXwYAAAAASUVORK5CYII=" style="display:none" alt="Hidden Image"/>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6608 <img id="loadingImage" src="data:image/gif;base64,R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==" style="display:none" alt="Loading Indicator"/>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6609 <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAA8CAYAAAAE9XR5AAAC0WlDQ1BJQ0MgUHJvZmlsZQAAOI2NlM9LFGEYx7+zjRgoQWBme4ihQ0ioTBZlROWuv9i0bVl/lBLE7Oy7u5Ozs9PM7JoiEV46ZtE9Kg8e+gM8eOiUl8LALALpblFEgpeS7Xlnxt0R7ccLM/N5nx/f53nf4X2BGlkxTT0kAXnDsZJ9Uen66JhU+xEhHEEdwqhTVNuMJBIDoMFjsWtsvofAvyute/v/OurStpoHhP1A6Eea2Sqw7xfZC1lqBBC5XsOEYzrE9zhbnv0x55TH8659KNlFvEh8QDUtHv+auEPNKWmgRiRuyQZiUgHO60XV7+cgPfXMGB6k73Hq6S6ze3wWZtJKdz9xG/HnNOvu4ZrE8xmtN0bcTM9axuod9lg4oTmxIY9DI4YeH/C5yUjFr/qaoulEk9v6dmmwZ9t+S7mcIA4TJ8cL/TymkXI7p3JD1zwW9KlcV9znd1Yxyeseo5g5U3f/F/UWeoVR6GDQYNDbgIQk+hBFK0xYKCBDHo0iNLIyN8YitjG+Z6SORIAl8q9TzrqbcxtFyuZZI4jGMdNSUZDkD/JXeVV+Ks/JX2bDxeaqZ8a6qanLD76TLq+8ret7/Z48fZXqRsirI0vWfGVNdqDTQHcZYzZcVeI12P34ZmCVLFCpFSlXadytVHJ9Nr0jgWp/2j2KXZpebKrWWhUXbqzUL03v2KvCrlWxyqp2zqtxwXwmHhVPijGxQzwHSbwkdooXxW6anRcHKhnDpKJhwlWyoVCWgUnymjv+mRcL76y5o6GPGczSVImf/4RVyGg6CxzRf7j/c/B7xaOxIvDCBg6frto2ku4dIjQuV23OFeDCN7oP3lZtzXQeDj0BFs6oRavkSwvCG4pmdxw+6SqYk5aWzTlSuyyflSJ0JTEpZqhtLZKi65LrsiWL2cwqsXQb7Mypdk+lnnal5lO5vEHnr/YRsPWwXP75rFzeek49rAEv9d/AvP1FSOihagAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+AEEhYRJKJxkPUAACAASURBVHgBAGaAmX8B/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvUj3EAAAIABJREFUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAD+/v4AAAAAAP///wD///8AAAAAAP///wAAAAAAAQEBAAEBAQAAAAAAAQEBAAICAgAAAAAAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAAAAAA/v7+AP7+/gD9/f0A/v7+AP39/QD+/v4A/f39AP39/QD9/f0AAQIBAAMCAwAEBAQAAwMDAAMDAwACAgIAAwMDAAEBAQABAQEAAgICAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP7+/gD///8A/v7+APv7+wD7+/sA+/v7AN7e3gDd3d0A5eXlAPLy8gDn5+cA////ABUVFQAQEBAAGRkZACMjIwAfHx8ABQUFAAYGBgAFBQUABAQEAAQEBAACAgIAAgICAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP39/QD8/PwA+vr6APb29gDFxcUAxMPDAN3a3ADz9/UACQQEABwKDAAQBQQA0e7tAAgVBwAVHg0A9e76AO/o9wD59voACwwKACQjJQA1NTUAODg4AAsLCwAJCQkABgYGAAQEBAACAgIAAgICAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ2dnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJmZmQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANra2gCRkZEA/Pz8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8PDwB1dXUAFRUVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/v7+AP39/QD5+fkA6+vrALKysgC/u7sA9vf3ADgUFQA1ERIAMBEQABUHCAACAAEAAAAAAF3JxgAZPhMAQ2gmAAABAAAAAAAA8uj5AOTW8ADey+wA383uAAkICQA7PDwAS0tLABMTEwAKCgoABgYGAAUFBQADAwMAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODg4ACUlJQA/Pz8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsLCwBwcHAAFRUVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/f39APv7+wD39/cAr6+vAK+urgAI/v4AWhscAEYXGQAIAwMAAAAAAAAA/wAA//8A/gAAAAAAAAAAAP4A/wD/AP/+/wAAAP8AAAAAAA0UBQApPhUAKkEXAPjz/ADXwekAwa6+AMTEwABISEwASEhIAA4ODgAKCgoABgYGAAICAgACAgIAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAObm5gCRkZEA+fn5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcHBwBvb28AGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/Pz8APr6+gDg4OAAj4yMAOTj4wBbHh8ATxscAAUBAgAAAP8A///+AAAAAAABAQEAAAAAAAD//wD///8A/wAAAP79/gD9/f0AAQAAAAAAAAD/AAAAAAAAAAMBAQAHCwMAMUwbAC5GGgDNseMAsK2tAM/PzgBhYWIAICAgAAwMDAAJCQkAAAAAAAICAgABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOvr6wCQkJAA9vb2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUFBQBtbW0AHx8fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/Pz8APj4+ADGxsYAeHR0AAXv8ACZMTQAVBwdAAUBAQD///4A////AAD/AAAA/wAA/v7+AP7+/gD///8AAAAAAAAAAAD///8A+/r6AP39/QD9/f0A/v3+AP79/gD9/P0A/fz9AP/+/wACBAAAOFYfAF2PNwD1AO0AiYiGAMnJyQDw8PAA9PT0APv7+wD+/v4A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO/v7wCPj48A8fHxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDAwBoaGgAJSUlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/Pz8APf39wC5ubkAiYiIAD4SEgCLLC4AFQcHAP///wD+/v8A//7/AP/+/wAAAAAA/wD/AP///wD///8A/v/+AP7//gAAAAAA//7/AP7+/wD9/f0A/f39AP39/QD9/f0A/v7+AP7+/gD9/P0A/fz9AP39/gASGgkAV4cwAB42DgCWlpUAv7+/APDw8AD29vYA+/v7AP7+/gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpHbeyAAAgAElEQVQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPPz8wCQkJAA7e3tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQBkZGQALCwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/Pz8APj4+AC/v78Al5WWAFsdHQBYHiAA/wAAAP8AAAD//v4AAAAAAAAAAQAAAAAA/f79AAAAAAAAAQEAAAAAAAIAAAAAAAAAAAAAAP8A/wD9/P0AAAICAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAIDAgD9/f0AAAAAAAQEAQBIbCgAChAGAKSkowAEBAQAOjo6AAICAgACAgIAAAAAAAMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPf39wCRkZEA6OjoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABfX18AMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/f39APv7+wDR0dEAl5SUAFMaGwBXHh8A/v//AAEBAAAAAAAA/v8AAAAAAAAAAf8AAP//AAAAAAAAAAAAAP//AAD/AAD9AP8AAAAAAAD/AAD//v8A/f79AAAA/wAAAAAA/gAAAAQCAwD+/P0AAgQDAP39/QAAAAAA/gD/AAAAAAAAAAMAAwMBADxbIgD9+f8ApKWiAA0NDQAwMDAAAQEBAAoKCgACAgIAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPn5+QCTk5MA4+PjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABXV1cAOTk5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7+APz8/ADr6+sAkY2NADUREgBeICEA////AP7/AAAA//8AAP8AAAABAAAAAAAAAP4AAAAAAAD/AP8AAAAAAAD//wAAAAAAAAEBAAAAAAAAAAAA/wD/AP79/AACAAQAAAAAAAEAAAD+AAEAAAD/AP/8AAAAAAAAAAD/AAMDBAD+/f4AAQAAAAAAAwABAgEAQmMkAPDo9wCjo6IAGRkZAAQEBAAEBAQAAQEBAAMDAwABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPv7+wCYmJgA3d3dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPT08AQkJCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7+AMHBwQDBwcEA6urqAAcHBwAfHx8ANzc3ADY2NgADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP7+/gD5+fkAmpeXAAT6+gBuJykA/v/+AAIBAQAAAP8AAAAAAAABAAD///8A////AAEAAQAAAAAA///+AAAAAAAAAQEAAAAAAAD+/gAAAAAA/wD/AP/+/wD9/f4A/f35AAMCAwD/AAEAAwT/AAIAAQD+AAEAAAEAAAH+AQAAAPwAAQMDAAD9/QD/AAAAA/8CAP0DAgBLcioAnm3JAKqqqgBiYmIABgYGAAMDAwABAQEAAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOLi4gDIyMgA2traAOrq6gD7+/sADQ0NABISEgAqKioANDQ0ABoaGgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+Pj4ANLS0gDV1dUA5eXlAO/v7wD4+PgA/f39AAUFBQALCwsAExMTAB8fHwAtLS0AKCgoAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP39/QCdnZ0A1tbWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRkYASkpKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABnZ2cAAAAAAAAAAAAAAAAAAAAAAAAAAACZmZkA/f39AJqamgDQ0NAAAAAAAAAAAAD29vYA19fXANfX1wDAwMAAeXl5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/gD7+/sAzc3NAMbJyQCFKy0ABwICAAAAAAD9/v4AAAAAAAD//wAAAAAAAAEBAAAAAAD///8AAAAAAP8AAAAAAAAAAP//AAAAAAAAAAAA/v//AAAAAAD///8A/v3+AAAAAAAAAP4AAAAAAAH8/wD+AAAAAgQAAAMCAgD9/PwAAAIDAAIAAQAAAwIAAAAAAAABAQD//v8ABAkCAEdqKQCwhc0A1zk5AAgICAAGBgYAAwMDAAICAgABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGdnZwAAAAAAAAAAAAAAAAAAAAAAAAAAAJmZmQAAAAAA8PDwAKioqADPz88AAAAAAAAAAAAAAAAAAAAAAPHx8QDx8fEA39/fALW1tQA4ODgAVFRUAA0NDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwcHBALCwsAD29vYAAAAAAAAAAAAAAAAAAAAAAAAAAAD6+voA+vr6AO/v7wDc3NwAvb29ABwcHABfX18AHh4eAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wCjo6MAz8/PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+Pj4AU1NTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKampgDQ0NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD+/v4A+Pj4AKejowA7FBUALA4OAP///wD///8AAAAAAAAAAAD///8A////AP7+/gD///8A/wD/AP3//gAAAAAAAAAAAP7//wD+/v4A/v/+AAAA/wAAAAAA////AP39/QD9/f4A/v3+APz8/gD9/v0A/f7+AP79/AD9/v0AAAAAAP3+/QD9/P0A/f3+AP79/QD+/f0AAAAAAAD/AAAjNBMAHzAUALa3tQDy8vIA9/f3APz8/AD+/v4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ODgAIWFhQDPz88AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyMjIAI2NjQDx8fEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAp6enAKampgD29vYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADk5OQAiYmJANbW1gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACpqakAx8fHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2NjYAWlpaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMrKygDExMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACcnJwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD+/v4A+/v7AM/PzwDb398AWBsbAP///wAA//8AAP//AP///wD+/v4A/wAAAP8AAAAAAAAAAAAAAP7//wAAAAAA/v7+AP38/QD//f4A//7/AAD/AAAA/wAAAAAAAP7//wD9/f4A/f38AP39/QD//v0A/v3/AAEAAAD+/f4A/vz9AP3+/gAAAQEAAQAAAAAAAAAAAAEA+/39AP38/QD//f4A/P39AD1dIwDd3N4A2dnZAPX19QD7+/sA/v7+AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OTkAJCQkADy8vIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADn5+cApKSkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwcHBAMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz8/ACbm5sA9PT0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwsLAAv7+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvLy8AYGBgAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACnp6cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoKCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/v7+APv7+wC1tbUANBISAB0ICgAA/wAA/wAAAP7//wD///8A/v//AP7//wD+/v4A/v7+AP3+/QD//f4A//3+AP/+/wAAAAAAAAAAAAAAAAD//v8A9fz8AP3//wD79/0A+vX6AP79/gD9/f4AAAABAP39/gD7/P4A/wD/AP8AAQD9/P0A/f39AP3+/QD9/P0A/f38AAIAAAAAAQAAAAEBAAIBAQAXIg0AHSoTAMLEwgDz8/MA9/j3APz8/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJaWlgD39/cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANLS0gDf398AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9PT0AK2trQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9vb2AMnJyQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5ubkAt7e3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBwcAAMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9vb2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBwcAHx8fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP39/QDv7+8A1tPTAG8hIwD+//4AAAAAAAAAAAD+//8AAAAAAAAAAAAA//8A/wAAAAEAAAAA/gAAAAAAAP8A/wAAAAAAAAAAAP8AAADD7u4AuOzqANvz8wAAAAAA8NH1AOPQ9AAUHgoAIT0LAB8xDgAAAAAAAwD/AP79AwAAAP0AAwICAAIAAAAAAAEAAQAAAAAAAQAAAAAAAAAAAAAA/wD+//8AAgEAAC9IGgC7l9gA7u7uAA0NDQAJCAkABQUFAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADt7e0AAAAAAAAAAAAaGhoATExMACIiIgAICAgA3d3dAKysrADn5+cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAy8vLACEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDAwAD5+fkAAAAAAAAAAAAAAAAAAAAAAAAAAABCQkIAQkJCABEREQD39/cA2dnZAKioqADz8/MAAAAAAAAAAAAAAAAAAAAAAAAAAADa2toAQ0NDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArq6uAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALi4uAA1NTUAGRkZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJiYmAAMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/gD9/f0AzMzMAGfP6fwAACAASURBVP///wA0DxAAAAAAAAAAAAD+//8AAP//AAABAQAA//8A/v7+AAAAAAD/AAAAAAAAAP8AAAD+//8AAgAAAPP9/ACM3d8A3PbzACQnJwBNJCQAERERAAAAAADv7+8A3NzcAM2o2QDkzPUANlwVAAMMBwAAAAAA/Pz+AAAE/wAA/AAAAgQAAAAA/wD//AAAAAD/AP4AAAABAAAAAgABAOXV7wDcyesA+ff7AMbGxgATExMADw8PAAgICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtLS0AaGhoAAQEBAAAAAAAAAAAACwsLAAfHx8Ag4ODAPHx8QAAAAAAAAAAAAAAAAAAAAAAAAAAAN/f3wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADLy8sAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ODgAV1dXAAAAAAAAAAAADQ0NADQ0NAABAQEAmpqaAAAAAAAAAAAAAAAAAAAAAAAAAAAA6enpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD9/f0ApKSkAHR0dAABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQBHR0cAOzs7ABISEgD7+/sA8fHxAAMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A/Pz8ANLS0gApDQ4ABAIBAP7//wAA//8AAAAAAP8AAAD//f4AAAAAAAAAAAAAAAAA/wD/AAAAAAD+/wAAAAAAAPf+/QCC3dsA9QQFAFlcXAAaGhoACwsLAAYGBgABAQEA/v7+ADg4OADk5OQAqKmnAMSa6QA/bBoAAAYDAAMDAwAAAAEAAAAAAAAAAAAAAQEAAQIBAPPt+gDXveoA3s/vAPLr/AD++vsAAgkJAAMKCQDn5+cA9/f3APr6+gD9/f0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDAwAZWVlAAQEBAAAAAAAAAAAAAAAAAAAAAAADQ0NAEJCQgCvr68AAAAAAAAAAAAAAAAAAAAAAAAAAADu7u4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAc3NzAOfn5wDm5uYA5+fnAObm5gDm5uYARkZGAAAAAAAAAAAAAAAAAAAAAAAAAAAAKCgoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPLy8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANzc3ADDw8MAPj4+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYWFgAQEBAAAAAAAAAAAAABAQEAAkJCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////APz8/ADj398AOAsLAP7//wAA//8A/wAAAAEAAAAA/v8AAAD/AAAAAAD///8AAAAAAP7//wAAAAAAAAAAAAAAAACj5OQA8P8AAFZVVQAbHBsAEhESAA4ODgAGBgYAAQEBAAAAAAD7+/sAExMTABMTEwCRkY4A1bbuADBQFgD+/wAAAgD/AP37AADawewA4M7xAO3m+wD59fkAAgMDAA0oJgAXQS4ADS0rAAgfHQDknqMA8NbaAPr6+gD7+/sA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz8/AAcHBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlJSUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9fX1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ODgAODg4AJycnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoKCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD5+fkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArq6uAC8vLwAPDw8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATExMAPj4+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP39/QD8/fwA6+vrABscHQAAAAAA/wD/AP/+AAD/AAAA/wD/AP7//wAAAAAAAAAAAAD//wAAAAAA////AAIBAADs+voAvu3sAEdISAAZGRkAFhUWABISEgAKCgoABQUFAAEBAQD///8A/v7+AAsLCwAFBQUASkpNAK2tqwAOGQYA6NX3AOvi+QD59PwA//7+AAkdHQARQy4ACy4rAAslJAACBwYAAAAAAAAAAAAAAAAACiAgAO7GygD8/PwA/f39AP39/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQkJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAERERAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz8/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6enpANLS0gDKysoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/Pz8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANDQ0AMzMzAMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAPf39wCnp6cAaGhoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMzMzAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/gD///8A9PP0APX5+QAVCAgAAP//AAD+AAAAAP8AAAAAAAD//wAAAAAAAP//AAAAAAD///8AAAAAAP///gD9AAAAxu/vAA4MDAArKysAERERABAQEAANDQ0ABwcHAAMDAwAAAAAAAAAAAP7+/gADAwMA////ADs7OwCssK8AzKnrAAQQDgANMDYAFywqAAopJgAFDQ0AAAABAAEDAwAAAQAAAAAAAAAAAAAAAAAAAAAAAAYTEQD49/cA////AP7+/gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASEhIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkJCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD9/f0A5eXlANzc3ADe3t4A29vbAPDw8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKCgoAcHBwABkZGQDc3NwA5OTkAAAAAAAAAAAAAAAAAAAAAAAAAAAAz8/PANHR0QAvLy8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////APX19QAAAAAACQABAP7+/gAAAAAA////AP4AAAAAAAAAAf/+AP7/AAAAAAAA/wD+AAEAAgAAAAAA////AN/39wAUFxcACgoKAAwMDAAKCgoABgYGAAMDAwABAQEAAAAAAAAAAAADAwMA////AAcHBwALCwsAHRscAO8TEQAdYl4AAQQDAAAAAAAAAQAAAP7+AP/+/gAAAP8AAAEBAAEAAAD/AgIAAAAAAAECAQADCgoA/v39APn5+QD///8A/v7+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBQUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////ANXV1QDJyckA09PTAPf39wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYAbm5uABwcHAAAAAAAXV1dAIiIiAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAACmpqYAJycnAAgICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASEhIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4+PgAAAAAAAcDAwAAAAAA/f//AAD//wAAAAAAAAAAAAAAAAAAAAAA///+AP8A/wD///0AAAAAAP///wDz//4ACQkJAAYGBgAGBgYABQUFAAEBAQABAQEAAAAAAAAAAAAAAAAAAAAAAAEBAQAEBAQACAgIABQSEgDw+/oA/v79AAD6/QACAgMAAAAAAP//AAABAAAAAPz+AP8AAAAA/wAAAQQAAAAEAwD//v8AAgcIAAAAAAD5+fkA////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcHBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6enpAJ2dnQDh4eEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAa2trACEhIQAAAAAAAAAAACAgIABCQkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8PDwAK+vrwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwcHAAAAAAD5/fwA/wD/AAAAAAAAAAAA////AP///wD9/v4A/v/9AP///wAA/wAA//8AAP//AAAAAAAADAEBAPn5+QABAQEAAAAAAAAAAAABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIAAQEBAAICAgD2+PgAAAgHAAD+/QAA/P0A/v39AP7+/QAA/P0A//z9AP/+/QD//v0A//z9AP/8/QAA+/0AAf38AP34+AAAAAAABgYGAP7+/gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4uLiAIWFhQDh4eEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAZmZmACgoKAAAAAAAAAAAAAAAAAAAAAAATk5OABISEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAwMAA39/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkJCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsLCwAAAAAA9vz9AP7//wAA//8A////AP///gD///4A/wD/AAD/AAD/AAAA/wAAAP7//wD+//4A/v//AB8HCADr6OgA+/z7APz8/AD9/f0A////AP///wAAAAAAAAAAAAAAAAAAAAAA/v7+AP7+/gD+/v4A4ePjAAkdHAAA/P4AAP79AAH//QAA/v0A/v79AP7+/QD+/P0AAQAAAAD+/QAA/v0AAP79AP8AAAD99fUAAQICAAcHBwACAgIAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+fn5AJqamgD5+fkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAAnJycAUFBQAH5+fgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYmJiAC8vLwAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICABbW1sAk5OTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKiogB8fHwAAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAKCgoACwcHAOj5+QAgCQkAAQD/AP8AAAAAAAAAAAAAAP//AAAA/wAA/v//AAAAAAAAAP8A//8AAAEBAAA1Dg0AqunoANTT1AAVFBUA+fn5AAUFBQABAQEAAgICAAEBAQAAAAAA/f39AP39/QD4+PgAv7+/APj19QAbKSgA//z8AAAAAAD//wAAAQEBAAEEAAAAAAEAAAABAP/8AAAAAAAAAAAAAP/+AAABBAIA++zrAAoLCwACAgIAAgICAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMzMzADr6+sAAAAAAAAAAAAAAAAAAAAAgelArwAAIABJREFUAAAAAAAAAAAAMjIyADs7OwAnJycABQUFAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFWSqm1AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjY2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsLCwANTU1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAObm5gC5ubkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAAEBAQACAgIAFBQUAOX49wD///8A/f7+AP7//QD+//8A/v//AAAAAAAAAP8AAAAAAAAA/wD///8A///+AP7//wASBAUAPhARALy5uADo6OgA8vLyAPf39wD6+voA/Pz8APv7+wD7+/sA+/v7APb29gDc3NwApaioABA3NAABBwYA//79AP/+/gAA/f0A//z8AP78/QD//PwA//78AP7+/QAAAAAA//z9AP/+/QAA/P4A9eDhABISEgAFBQUABAQEAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMrKygAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLS0sAZ2dnACwsLAAFBQUAAAAAAAAAAAD7+/sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFZWVgAKCgoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtbW1AOnp6QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIABAQEABoeHgDY9vUAAAAAAP8A/wAA/wAAAQAAAAAAAAAA//8A/v//AP///wD+//8AAAAAAAAAAAD9/v4A/v//AFcWFgAN/v4Am5eXANzc3ADv7+8A8vPyAPPz8wD19fUA9fX1APHy8QDU1NQAfn5/APf29gAPOjYAAf7/AAD8/gD//PwA//39AP/+/gAA/P4A//8AAP/7/QAA/v0A/v79AAAAAAABAAAAAAIAAPzf4gAWFBQABgYGAAMDAwADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADo6OgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ0NDAAAAAAAAAAAAAAAAAAAAAAAAAAAA8/PzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODg4AVFRUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz8/AClpaUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAAQEBAArKysA2fPzAPr9/AABAAEAAAEAAP///wD+/v8A/v8AAP//AAD///4A//7/AP7//wD9//8AAP//AAD//wAGAQEAdBocAA739gCLiYkAmpqaAMTDxADb29sA2traAL+/vwCPjo8Afn5/ABEFHQACAgQA5KKoAPz19AD+/fwA//39AP/9/QAA/P0AAP79AAD9/QAA/f0AAPz+AAH+/gD+/v0A//z9APvw8gDy3+AAHx8fAAYGBgAFBQUAAgICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8/PzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz8/AAAAAAAAAAAAAAAAAAAAAAAAAAAANPT0wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/f39AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs7OwDJyckA2dnZAAAAAAAAAAAAAAAAAAAAAAAAAAAA2dnZAMXFxQA7OzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAAEBAQADAwMAMjIyAKKfnwDO8/IANQ4PAAD//wAAAAAAAAD/AAAAAAAAAP8A/wAAAAAA/wAA/wEAAAAAAAAAAAAAAAAA////AAoBAQB1Gx0AyfPzAL7V1ACTyckAAQEBAP///wACAQIAFQsfADwaYQAgDzAA8vvqALLeiQDinqQAHmNdAAIHBwABAQIA/v/9AAEA/wABAwMAAAMDAAEA/wD//PwAAAIDAP4EAADxzM0ABwkJACQkJAAHBwcABgYGAAMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcHBwD29vYAAAAAAAAAAAAAAAAAAAAAAAAAAADLy8sAREREAAAAAAAAAAAAAAAAAOvr6wC0tLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz8/AADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW1tbAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsrKwA8vLyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEABAQEAA8PDwAnKioAwe/vAAD/AAAAAAAA/v8AAP8AAAD+/v4A/v//AP7//wD+//8A/v/+AAD+/wD+/v4A/v7+AP///wD///8AAAAAADYMDAB2GRsAkCMkACwJCQANBhQAVSWJAEYecwAhEDIAAgIDABEJGwBSJXsA/O7xAOKdogD99fYA/v37AAD+/gAB/v8A//39AAD+/QD//P4AAAAAAAECAAAAAAAA8cjMACEdHgAMDAwACAgIAAUFBQABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaGhoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAr6+vAMDAwAD09PQA9PT0AMTExACIiIgA8/PzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD29vYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABcXFwBMTEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9vb2AKqqqgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAAMDAwAHBwcAREVEANDx8QDj+PgA/v//AP///gD//v8AAAAAAAD//wAA//8AAAAAAAAAAAD/AP8AAAEAAP8AAAD/AP8A/gAAAP3//gD+//8AAP//AAgBAQAGAgIAAgEDAAUDCAABAQIAAQEBAAMCAwAEAgEAEgoaAFUofQD97vIA4qGlAP319QAAAAAAAAAAAP/9/QD//P0A//38AP/8/QD++/0A9tvcAPbe3wA2NjYACwsLAAkJCQAEBAQAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALy8vAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz8/ACnp6cAc3NzAHNzcwCjo6MA9PT0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7+/vAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARkZGABsbGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADLy8sA1NTUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQACAgIABgYGAC8uLwAgHR0AsOvqAP//AAD///8A////AP//AAD+AAAA////AP///wD///8A////AP/+/wD+/v4A/v7/AAD//wAB//8AAQD/AP///wD+/v4AAAAAAAABAAADAwMAAgIBAAECAgABAgAA/wAAAAEAAQAUCx0AVyuAAP7u8gDioacA/fX2AP79/AACAQIAAQABAAABAAAAAAAAAQEBAOy3uwAfISEAHx8fAAwMDAAHBwcABAQEAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4+PgANDQ0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAAcHBwAAAAAAAAAAAAAAAAAAAAAAAAAAAOHh4QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDAwBdXV0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKampgD5+fkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAAUFBQAKCgoAUVRUAMrx8ADX9fQAAAEBAAABAAD+AP8AAP//AAEBAQAAAAAA////AP8A/wAAAAAAAAAAAP///wD///8A/v//AP7//wD+/v4A////AAD/AAABAAEABAMDAAMCAwAEAgEAAgIDAAICAwABAwIA/gAAABIKHABbLoQA/u7yAOOhpQD99vYA/v37AP79/AD//P0A//39APLP0QD1290AOzk5AA4ODgALCwsABwcHAAEBAQABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICAgAZWVlAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgYGAGxsbAAyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAADMzMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAISEhAEJCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADt7e0AsrKyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQACAgIADExMQAzMDAAnunoAPj9/QAAAAAAAAAAAAAAAAD///8A////AP///wD+/v8A/v//AAH//wD///8A////AP///wD///8AAAEAAAABAAAAAP8AAAAAAAECAQABAgAAAQIDAAIBAQACAQEAAQECAAMCAQACAgEAEgsaAFsvhQD97/IA46ClAP75+gACAQIAAAAAAP349gDqrrEALi0tACMjIwAPDw8ACQkJAAUFBQADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACcnJwBxcXEADw8PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKCgoAHp6egAsLCwAIyMjAAAAAAAAAAAAAAAAAAAAAAAAAAAA3NzcAOPj4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPT08AERERAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL29vQDh4eEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAd8jdrAAAgAElEQVQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAAQEBAAcHBwALCwsAW15eAP0GBgCe5+cA/v7+AP/+/gD+/v4A////AP8AAAD+AP8AAAAAAAEA/wD+AAAAAAAAAAAAAAD///8A/v7/AP/+/wD//v8A/wAAAAEBAQACAgMABQQFAAMCAgABAwMAAQMDAAMCAQACAQIAAgEBAAIBAgAWDR4AYDKHAP3v8gDinaMA/Pf3AP/+/wDop60ACQUGAENEQwAREREADQ0NAAgICAADAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJiYmAISEhABZWVkAKysrAA8PDwADAwMACQkJABkZGQA+Pj4AcnJyAHFxcQAZGRkAAAAAACcnJwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACtra0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD9/f0A+vr6APHx8QDLzMsAlZGSAEQODwBSFhYA/v7+AP///wD+AP8AAP8AAP///wAAAP8A//8AAP///gD//wAAAAEAAP7//wAA/wAAAAD/AKDr6wDfAA8AWC2IAAD/AAAAAAAAAwIBAAICAgAAAQAAAgIBAAECAwADAgIAAQEAAAICAwDv9+UAncp1AAMSDwAJGhgA+NjbAFNRUQAsLCwAGhoaABEREQAKCgoABAQEAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAAwMDAAUFBQALCwsALy4vAFhbWwC47+4As+rqAAAAAAAAAAAAAAABAAEA/wAAAAAA////AP///wD//wAA/v//AP7//wAA//8AAAD/AAAAAAD/AAAAAAAAAAQCAgADAwEABQUDAAIDAgACAwEAAgEBAAEBAwADAQIAAgEAAAQCAwADAgIAFQwfAGQ5jAD77O4A8tLVAEE/PwAiIiIAEBAQAAwMDAAHBwcAAgICAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQACAgIACAgIAA0NDQA/Pz8A+/v7AKqpqQDw/f0AVxUVAAIA/wAAAAAAAAAAAP//AAD///4AAAABAAIBAQD+//4A////AP///wAAAAAAAAAAAAEAAAABAQEAAwMCAAAAAAAA/wAAAgECAAIDAwAAAAAAAQIAAAECAwD/AgIAAgECAP0C/ADH3rAAAwECADMzMQAsLCwAExMTABEREQAKCgoABQUFAAMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAAAAAAAKCgoA////AENDQwALCwsApaKiAOPm5QBiFRQAEgMFAP8A/wAAAAAAAAEBAP7+/wAAAP8A//8AAAAAAAAAAAAAAAAAAAD//wAAAgEAAwQEAAEA/wAAAAAAAgMCAAAAAAACAwIAAAAAAAMBAQABAgIAAgECAPD56ACu0IkA8vvqAEtLSQAnJycAFRUVABQUFAAMDAwABQUFAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIABQUFAAsLCwABAQEAOTk5ABYWFgCinp4AguPkAEoREQBBDg4AAv8AAP4A/wAAAP8A////AAAAAAD///8A/v//AAD//wD/AAAAAQABAAMDAgAA/wAAAAAAAAICAgAAAAAAAQEBAAECAgD///8A/v/7AMTerwDG3qwAGBkXAFlKWQAbHBsAEhESABEREQAPDw8ACAgIAAQEBAABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAAICAgAFBQUACgoKAAICAgAEBAQAdHh4ALi4uAC6v78AwPT0AEMMDAA3CwwABgD/AP///wAAAAAA////AAAAAAD+AAAAAAAAAAABAAACAgIAAQEBAAAAAAACAAAA/wICAAIAAAD5/fYAz+S6AMnhsAABA/4AOz46ADo5OgAREREAERERAA4PDgAKCQoACAgIAAICAgABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAAgICAAUFBQACAgIAAgICAAUFBQBPT08ANzg3AL28vQC4zMwAsO7uAC0KCgAoBwcAJggIAA8BAgD+//4AAAAAAAD/AAAAAAAABAMDAAAAAAAAAAAA7/boAOLw1QDb68oA3uvPAAcHCAAtMCsANzc3ABUVFQAQEBAADg4OAAwMDAAJCQkABQUFAAMDAwABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////APz8/AD7+/sA9/f3APX19QD09PQA7+/vAM7OzgDS0dEA5uTkAPb5+QAHAQEAFwcIAAsA/gDl+vsA+AEHABwRKQD2+e8A7vfoAPr89wALCgwAGRoZACYmJQArKysADg4OAA0NDQANDQ0ACwwLAAoJCgAHBwcAAwMDAAICAgABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/v7+AP39/QD5+fkA+fn5APf39wD19fUA9/f3APb29gDi4uIA5OTkAOvr6wD29vYA7e3tAAAAAAAQEBAACAgIABYWFgAaGhoAGhoaAAgICAAICAgACgoKAAsLCwAJCgkACAcIAAYGBgAFBQUAAwMDAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJItZQAAAArMSURBVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/f39APz8/AD9/f0A+fn5APr6+gD6+voA+fn5APr6+gD6+voA+fn5APj5+AD9/P0AAgICAAYGBgAHBwcABgYGAAYGBgAICAgABgYGAAcHBwAGBgYABQUFAAMDAwACAgIAAgICAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAAAAAA/v7+AP7+/gD8/PwA/v7+APz8/AD8/PwA/P38AP38/QD7+/sA/Pz8AAMDAwAFBQUAAgICAAUFBQAEBAQAAwMDAAQEBAADAwMAAgICAAEBAQACAgIAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/v7+AAAAAAD///8A////AP///wD9/f0A/v7+AAAAAAAAAAAAAQEBAAEBAQADAwMAAQEBAAEBAQABAQEAAgICAAAAAAABAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACanuzMvN2MUAAAAAElFTkSuQmCC" style="display:none" alt="Logo of Krona"/>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6610 <noscript>Javascript must be enabled to view this page.</noscript>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6611 <div style="display:none">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6612 <krona collapse="true" key="true">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6613 <attributes magnitude="count">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6614 <list>members</list>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6615 <attribute display="Reads" listAll="members">count</attribute>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6616 <attribute display="Unassigned" listNode="members">unassigned</attribute>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6617 <attribute display="Rank" mono="true">rank</attribute>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6618 </attributes>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6619 <datasets>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6620 <dataset>0</dataset>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6621 </datasets>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6622 <node name="Root">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6623 <count><val>100</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6624 <node name="Eukaryota">
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6625 <rank><val>superkingdom</val></rank>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6626 <count><val>94</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6627 <node name="Metazoa">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6628 <rank><val>kingdom</val></rank>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6629 <count><val>94</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6630 <node name="Chordata">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6631 <rank><val>phylum</val></rank>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6632 <count><val>94</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6633 <node name="Craniata">
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
6634 <rank><val>subphylum</val></rank>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6635 <count><val>94</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6636 <node name="Gnathostomata">
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6637 <rank><val>superclass</val></rank>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6638 <count><val>94</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6639 <node name="Mammalia">
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6640 <rank><val>class</val></rank>
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
6641 <count><val>94</val></count>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6642 <node name="Euarchontoglires">
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6643 <count><val>94</val></count>
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
6644 <rank><val>superorder</val></rank>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6645 <node name="Rodentia">
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6646 <count><val>94</val></count>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6647 <rank><val>order</val></rank>
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6648 <node name="Sciurognathi">
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6649 <rank><val>suborder</val></rank>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6650 <count><val>94</val></count>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6651 <node name="Muridae">
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6652 <rank><val>family</val></rank>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6653 <count><val>94</val></count>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6654 <node name="Murinae">
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6655 <rank><val>subfamily</val></rank>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6656 <count><val>94</val></count>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6657 <node name="Rattus">
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6658 <rank><val>genus</val></rank>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6659 <count><val>94</val></count>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6660 <members>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6661 <vals><val>IA_1-296315</val><val>IA_1-322295</val></vals>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6662 </members>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6663 <unassigned><val>2</val></unassigned>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6664 <node name="Rattus norvegicus">
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6665 <members>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6666 <vals><val>IA_1-144417</val><val>IA_1-278966</val><val>IA_1-314709</val><val>IA_1-324951</val><val>IA_1-27817</val><val>IA_1-95255</val><val>IA_1-104173</val><val>IA_1-135979</val><val>IA_1-139090</val><val>IA_1-139090</val><val>IA_1-139090</val><val>IA_1-144996</val><val>IA_1-160446</val><val>IA_1-160446</val><val>IA_1-160446</val><val>IA_1-160446</val><val>IA_1-160446</val><val>IA_1-160446</val><val>IA_1-160446</val><val>IA_1-160446</val><val>IA_1-161439</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-190855</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-205154</val><val>IA_1-216231</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-236286</val><val>IA_1-237681</val><val>IA_1-250166</val><val>IA_1-254274</val><val>IA_1-254274</val><val>IA_1-27817</val><val>IA_1-29000</val><val>IA_1-291427</val><val>IA_1-291427</val><val>IA_1-293054</val><val>IA_1-293054</val><val>IA_1-296315</val><val>IA_1-310974</val><val>IA_1-310974</val><val>IA_1-311282</val><val>IA_1-311282</val><val>IA_1-42600</val><val>IA_1-45102</val><val>IA_1-45102</val><val>IA_1-48105</val><val>IA_1-48105</val><val>IA_1-57254</val><val>IA_1-61975</val><val>IA_1-61975</val><val>IA_1-66943</val><val>IA_1-68288</val><val>IA_1-82334</val><val>IA_1-95526</val></vals>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6667 </members>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6668 <rank><val>species</val></rank>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6669 <count><val>92</val></count>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6670 </node>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6671 </node>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6672 </node>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6673 </node>
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6674 </node>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6675 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6676 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6677 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6678 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6679 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6680 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6681 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6682 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6683 <node name="Bacteria">
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
6684 <count><val>6</val></count>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6685 <rank><val>superkingdom</val></rank>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6686 <node name="Proteobacteria">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6687 <count><val>6</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6688 <rank><val>phylum</val></rank>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6689 <node name="Gammaproteobacteria">
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6690 <rank><val>class</val></rank>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6691 <count><val>6</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6692 <node name="Enterobacteriales">
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6693 <rank><val>order</val></rank>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6694 <count><val>6</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6695 <node name="Enterobacteriaceae">
9
1334cb4c6b68 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 0be1842634941540d5e313b1ad9cb5eb81fd7305"
iuc
parents: 2
diff changeset
6696 <rank><val>family</val></rank>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6697 <count><val>6</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6698 <node name="Shigella">
2
50f204c82159 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23
iuc
parents: 1
diff changeset
6699 <count><val>6</val></count>
1
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6700 <rank><val>genus</val></rank>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6701 <node name="Shigella flexneri">
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6702 <count><val>6</val></count>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6703 <rank><val>species</val></rank>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6704 <members>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6705 <vals><val>IA_1-79371</val><val>IA_1-84488</val><val>IA_1-270826</val><val>IA_1-285361</val><val>IA_1-93958</val><val>IA_1-99821</val></vals>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6706 </members>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6707 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6708 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6709 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6710 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6711 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6712 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6713 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6714 </node>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6715 </krona>
09552faff9c0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit e4c2b31a732b57cc0210070afeaa2dfeca1e1eb4
iuc
parents:
diff changeset
6716 </div></body></html>