tags:

views:

189

answers:

2

If anyone has used jsTree in chrome and had a similar issue please let me know. It doesn't break in IE (first time for everything) nor in FF. Basically, when I mouse over an icon it changes, but not with any regularity, some times I mouse out and stays the same (incorrect) and when I mouse over it again it changes correctly. I'm using a sprite map and my type definitions look like so:

$(...).tree({
    types : {
        'default': { icon: { image: spritePath} },
        'Type1': { icon: { position: '-42px -153px'} },
        'Type2': { icon: { position: '-28px -153px'} },
        'Type3': { icon: { position: '0px -153px'} },
        'Type4': { icon: { position: '-14px -153px'} }
    }
});
A: 

I'm experiencing this problem as well. I am not sure under which circumstances it occurs, but it seems to work fine in both FF and IE. What's even more strange, is that the types demo on http://www.jstree.com/documentation/types doesn't display the problem when i open it in Chrome.

Jape
A: 

I stumbled on the solution by coincidence. Giving the elements an Id seems to fix the problem. I'm using JSON as datasource and this does the trick.

{ "attr" : { "id" : "someId", "rel" : "noChildren" },
  "children" : [  ],
  "data" : "someName"
}
Jape
yeah, I gave up and wrote my own tree... thanks for the heads up though.
Master Morality