I tried finding a post here with a similar issue but had no luck. I am attempting to create movable icons using an image element.
If I add the event listener directly to the image element, it does work but if you move the mouse fast, you of course get outside the element and lose the listener (painting can not keep up with the events). If I add the event listener to the root element, and check for the element type, it managed to find the type of elements I want and change the cursor on mouseover like it should. But, it will not move the element. Troubleshooting One interesting thing I noticed, is when I print ((Element) evt.getCurrentTarget()).getTagName() I get svg when the listener is added to the root, and image when the listener is added to the image element only. This would make sense to me if I wasn't able to distinguish between elements and only mouse over on the image elements (I added a tag called movable and can check that the element has that tag and only change the cursor for those elements). Any ideas as to what I'm doing wrong? Or is there a better way to create movable elements? Thanks in advance for any help. -- View this message in context: http://old.nabble.com/Movable-elements-and-events-tp29573506p29573506.html Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org