philogb / jit

The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web
http://thejit.org
Other
1.51k stars 297 forks source link

Spacetree: Some 'ellipse' nodes are not shown in IE #36

Closed longsoft-dev closed 14 years ago

longsoft-dev commented 14 years ago

If node type is 'rectangle', it's OK, but change to 'ellipse', some nodes disappeared. It's easy to repeat: in current 2.0a version, open Jit-2.0.0a\Jit\Examples\Spacetree\example4.html in IE, you would see.

philogb commented 14 years ago

Hi,

This is actually an ExCanvas bug. I recommend you to use FlashCanvas for IE support. It has better performance and from what I've seen works very well. You can try the FlashCanvas example here: http://flashcanvas.net/examples/thejit.org/static/v20/Jit/Examples/Spacetree/example4.html .

Here's the blog announcement for more information http://blog.flashcanvas.net/2010/07/flashcanvas-pro-13-beta1-is-released.html .

longsoft-dev commented 14 years ago

Hi Phil, It's not that simple. I was using FlashCanvas, but there were actually two issues involved.

  1. Break in IE6, but work in IE8 if simply change node type from 'rectangle' to 'ellipse'. So this could be a issue of whether FlashCanvas supports IE6 or not.
  2. Break in IE8 if change node height from 40 to 60. The root node is not shown. The ellipses were drawn first, then seem background colors were changed to black except the last node. I would reckon the nodes are still there(because tips still work) just not being shown. P.S. my first level nodes under root were 8. So this could be an issue of undocumented size limit of the canvas? Once that limit is exceeded, it breaks.
philogb commented 14 years ago
1. Break in IE6, but work in IE8 if simply change node type from 'rectangle' to 'ellipse'. So this could be a issue of whether FlashCanvas supports IE6 or not.

If there's a JavaScript error in IE6 but not in IE8 there's a big chance you left some trailing comma somewhere in your JS code. The demo I sent you using Ellipse nodes works well with IE6 with FlashCanvas.

2. Break in IE8 if change node height from 40 to 60. The root node is not shown. The ellipses were drawn first, then seem background colors were changed to black except the last node. I would reckon the nodes are still there(because tips still work) just not being shown. P.S. my first level nodes under root were 8. So this could be an issue of undocumented size limit of the canvas? Once that limit is exceeded, it breaks.

If the height of the Tree exceed the height of the canvas then that level is not shown by default (this is a feature of the SpaceTree acually). To turn it off you have to set

constrained: false

as constructor option in the visualization. More info here: http://thejit.org/static/v20/Docs/files/Visualizations/Spacetree-js.html#ST .

Could you paste the JSON you're using and if possible a screenshot with the issue?

longsoft-dev commented 14 years ago

Sorry I don't know how to upload screenshot to github?

philogb commented 14 years ago

Try uploading it to any pic service like imgur.com and then share the link.

longsoft-dev commented 14 years ago

Here you go: http://imgur.com/Ob013.png

philogb commented 14 years ago

that's with excanvas, right? what about flashcanvas? the example I linked you to uses flashcanvas and works just fine.