Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to get current node immediately (mousemove)? (Read 1519 times)
Brarord
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 18
Joined: Dec 30th, 2019
How to get current node immediately (mousemove)?
Jan 4th, 2020 at 9:08am
Print Post  
Hi,
I want to do dynamic highlighting of rows in the table after moving the mouse over them. That is why i need this data immediately and that is why i cant use event "NodePointed" because of his little lag.
I created the "mousemove" handle.
1. The conversion of the x / y parameters of the document to the proper ones used on the canvas works correctly.
2. but I can't execute the "GetNodeAt" method without error.
Something is wrong... I've tried all night in all ways but it doesn't want to take the parameter, I don't know why.

Here is a screenshot that shows this error. I have this error often when I just give the wrong parameter.


Anyone have an idea what i am doing wrong?


Regards,
poor student Cry
  
Back to top
 
IP Logged
 
Brarord
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 18
Joined: Dec 30th, 2019
Re: How to get current node immediately (mousemove)?
Reply #1 - Jan 5th, 2020 at 4:17am
Print Post  
I already fix that, i don't know why is this working. Can someone tell me what is diffrent beetwen PivotPoint and normal var point?

This code works well:
Code (Javascript)
Select All
var point = PivotPoint.Point;
point.x = diagram.pointerPosition.x;
point.y = diagram.pointerPosition.y;
var tableNode = diagram.getNodeAt(point); 



Regards,
poor student Undecided
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: How to get current node immediately (mousemove)?
Reply #2 - Jan 5th, 2020 at 5:48pm
Print Post  
Proper name of the method is getNodeAt (in our JavaScript library at least), and since JavaScript is case-sensitive, in your first try it complains the upper-cased GetNodeAt does not exist. PivotPoint.Point is some random class from libraries you are using I guess, and you are adding x,y fields to it, which getNodeAt then happily uses.

Regards,
Slavcho
« Last Edit: Jan 6th, 2020 at 5:11am by Slavcho »  
Back to top
 
IP Logged
 
Brarord
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 18
Joined: Dec 30th, 2019
Re: How to get current node immediately (mousemove)?
Reply #3 - Jan 5th, 2020 at 11:46pm
Print Post  
Wow Shocked, am I blind? It was actually a typo... cmon...
Thanks Slavcho.


Regards,
poor student Undecided
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint