| Page 1 of 1 | [ 3 posts ] |
|
I'm using the YUI 3 Resize Utility to resize a number of div's in a parent div. When resizable div is selected for resizing, I would like to perform some logic on it. I can use the 'click' event to select the node if it is clicked on before resizing, but if a user clicks on the resize handles to start the resizing, the 'click' event does not notice that the div, or any of its children, have been clicked on. I can get around this by using the 'resize:start' event for my Resize object, but then I'm left with the event target being the resize object, and I can not find a way to get the node it was being used on. Anyone have any ideas? Thanks. Find the code at http://pastie.org/3735193
|
|
Figured it out. For those interested in the solution: For any of the resize:* events attached to a Resize object, you can get the node being resized in your event function with "this.get('node')". Even though in the attributes tree it shows that node value to be null, somehow it's actually there.
|
Juan Ignacio DopazoYUI Contributor
|
I think there are many ways of doing it. resize:start is one way. You can get the node from the resize instance by doing e.target.get('node').
Another way would be to use event delegation on the mousedown event. |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group