The MindFusion Forums | |
Flow Diagramming Components >> Html Canvas & JavaScript >> How to update image of node on mouse hover event?
https://mindfusion.eu/Forum/YaBB.pl?num=1523878492 Message started by Shafi on Apr 16th, 2018 at 11:34am |
Title: How to update image of node on mouse hover event? Post by Shafi on Apr 16th, 2018 at 11:34am
I have added image inside node and I want this image should appear bigger or highlight on mouse hover on it.
How to do this? |
Title: Re: How to update image of node on mouse hover event? Post by Lyubo on Apr 16th, 2018 at 1:28pm
Hi,
One thing you can do is handle the diagram canvas' mousemove event and hit-test for a node under the cursor. If you detect a node, you can then further test if the cursor is above the image in question, using the technique from this post. When you detect the image, you can then set a local variable to the pointed node, which can be used inside your onUpdateVisuals callback to increase the bounds of the image. Code (javascript):
Regards, Lyubo |
The MindFusion Forums » Powered by YaBB 2.6.11! YaBB Forum Software © 2000-2024. All Rights Reserved. |