Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic equals() or compare boxes? (Read 2097 times)
dhoult
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Jun 3rd, 2008
equals() or compare boxes?
Jun 20th, 2008 at 7:20pm
Print Post  
in my javascript, i am storing the current box i'm editing in the diagram in a variable called editingNode.
In part of my script I want to parse some tag info for all boxes except the one i'm editing.
so i'm looping through the canvas.getBoxes() collection and doing if(editingBox!=currentBox){ // dosomething }
this works in Firefox and is accurate. In IE, that if statement is always true.

?
i tried if(currentBox.equals(editingBox)==false) but that had the same result.
is there a NodeID or some unique value i can look at in each box or is there another way to do this?

Thanks in advance
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: equals() or compare boxes?
Reply #1 - Jun 23rd, 2008 at 6:54am
Print Post  
The ZIndex values are unique for items in the same diagram, so you could compare currentBox.getZIndex() with editingBox.getZIndex().

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
dhoult
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Jun 3rd, 2008
Re: equals() or compare boxes?
Reply #2 - Jun 23rd, 2008 at 1:24pm
Print Post  
Ok. Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint