We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Units of offsetX / offsetY for nodes

When dropping a node onto a swimlane, the new node has pixel values for offsetX/offsetY (I assume). When comparing the node position with a already on a swimlane-lane placed node, these offsets do not match. The node already on the swimlane has offsetX/offsetY in values of SNAP units (I assume).

Is there a possibility to compare the positions of these nodes or to get the swimlane-lane and phase the moved node is dropped on?

Is there a documentation about the units of offset and margin units?

3 Replies

SG Shyam G Syncfusion Team January 24, 2017 11:04 AM UTC

Hi Dirk, 

By default, the units of nodes offset and margins are a pixel. The node which is rendered at the initial rendering will not get snapped and the node which is dropped onto a diagram at runtime will get snapped. For example, the node which you rendered at the initial rendering with offset(offsetX:147,offsetY:150) will be rendered at the same position and the node which you drop on a diagram with offset(offsetX:147,offsetY:150) gets snapped and rendered at position(offsetX:150,offsetY:150). So please provide us more details such as which element do you need to compare it or provide us an exact use case of your requirement 

Regards, 
Shyam G 



DR Dirk Reuschling January 26, 2017 09:39 AM UTC

Hi Shyam,

I am dragging a node in a diagram with swimlanes. I want to check the following things:
  • whether the dragged node is over an existing node (this should be forbidden).
  • on which lane the dragged is positioned
  • which nodes are left and right of the dragged node (to connect them automatically in the drag completed handler when they are in the preceding/following phase)
The coordinates of the nodes have the following differences:
- the existing nodes have offsets relative to the lanes (a node on the second lane has offsetY 0)
- the dragged node has offsets relative to the diagram 

So how can I get the information I need?

Regards,
Dirk


SG Shyam G Syncfusion Team January 27, 2017 01:27 PM UTC

Hi Dirk, 
  
Could you please provide us an essential studio version that you are using at your end. so that we can validate it further and provide a better solution. 
  
Regards, 
Shyam G 


Loader.
Live Chat Icon For mobile
Up arrow icon