Profile Picture

Controlling Snap and Connect Behavior

Posted By Jason Irby 12 Years Ago
Author
Message
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Jason,

You can disable snapping completely if you want. To do this, use the following code:

drawingView.SnapManager.SnapTo.None = true;



Best Regards,
Nevron Support Team



Jason Irby
questionmark Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 59, Visits: 77

Hi.

I have two shapes I've connected programmatically (See attached example image).  I then have a line shape I want to move around the surface of one of the connected shapes.  The line shape needs to have end plugs or geometry points so I can swing the line around in angle as well as translate.  However, when I get the line end point any where near the connection point for the underlying shape, it wants to snap over to it.  Also the line end points want to snap over to the underlying shapes corners.  For certain reasons I don't want this.  I need to be able to position the line points around on the surface of the underlying shape with percision.  I've tried turning off grid, ruler, and rotation snapping.

 

1.  Probably the easiest option would be if I can set the snap-to radius for the document or connection port to 0, if there is such a property.  All my connections are done programattically. In this use case I really don't want any snapping behaviors.  I want precision placement. 

2.  Less ideally, can I tell a connection port not to accept anymore connections and not to cause other things to snap over to it? (Through this would help the corners issue).

 

Thanks in advance,

Jason Irby

 



Attachments
plugExample.gif (146 views, 4.00 KB)


Similar Topics


Reading This Topic