-
17 Apr 2010 5:49 AM #11
Thanks this helped me a lot!
@Animal: I tried to set a mouseout event too for a node. But if i set tree.body.on('mouseout', this.onTreeMouseout) i get an error in ext-all-debug.js at line 2646 - Undefined value
The error happens when the mouseout event will fire.
greetz
Chris[ JSONpad / ExtJS Board - JSONpad ]
-
17 Apr 2010 10:14 AM #12
Got it! but no idea why this works:
I just copied the Mouseover Plugin and made almost the same for a Mouseout Plugin. I just changed the events written in the plugin (mouseover/mouseout). This works!
However, maybe someone can explain me why?
cause i'm not realy understanding why i can't make both events in one plugin.. 
greetz
Chris[ JSONpad / ExtJS Board - JSONpad ]
-
5 Nov 2010 5:07 PM #13
Hi, I'm trying to add mouseover/mouseout events to my treenodes.
Mouseover works fine, however, the mouseout event cannot be triggered.
Any ideas?
-
5 Nov 2010 11:35 PM #14Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
I would do this completely different!
TreePanel already uses node mouseover and mouseout events, so there is no need to program this yourself.
Configure your treepanel with trackMouseOver:true and override TreeNodeUI onOver and onOut to fire mouseover and mouseout events on the node.
-
8 Nov 2010 11:22 AM #15
Hi Condor, thank you for the response. I completely customized the tree, e.g. use different icons and styles for the tree node. I added trackMouseOver:true, but nothing happens when mouse over/out.
How to add more than one plugins in the config??
Thanks,
-
8 Nov 2010 1:14 PM #16
Hi Zerogiven, did you just copy mouseover code and then change over->out? I did the exact as you did, but mouseout plugin doesn't work at all.
-
8 Nov 2010 1:16 PM #17
how to oeverride onover and onout? I did not find them in api doc?? also, how to get treenode when mouseover/mouseout? there are mothods for select/click, but did not see over/out in api doc??
-
8 Nov 2010 4:12 PM #18
ok, I get it working now
-
24 Feb 2011 2:13 AM #19
Hello,
I'm using both DD and context menu for a tree.
When you use NodeMouseoverPlugin, context menu works only when you click on the icon of the node and DD works when you click on the link of the node. This is not preferable in my case.
This is short and simple and solves the problem.Configure your treepanel with trackMouseOver:true and override TreeNodeUI onOver and onOut to fire mouseover and mouseout events on the node.
Code:Ext.override(Ext.tree.TreeNodeUI, { onOver : function(e) { this.addClass('x-tree-node-over'); el = e.getTarget(); rowPos = Ext.get(el).getXY(); console.log(this.node.id); } });


Reply With Quote