Need Stickyer NLineShapes


Author
Message
Jason Irby
Jason Irby
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
Posts: 59, Visits: 77

In our app a user can select an NLineShape connecting two other shapes and do certain things to that line.  The problem is that the slightest movement of the mouse while selecting the line can bump it enough to come unplugged to the shapes it was connected to.

I have noticed that the lineshapes in the designer have a certain amount of “stickyness” where it resists coming unplugged until the line has been drug beyond a certain threshold.  

This is the behaviour I want for my lineshapes but I have not figured out what I need to do.

Is there some kind of threshold property on the line or ports or plugs I need to set?

 

Thanks in advance,

Jason


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Jason,

How do you create the 2D shapes that the line shape connects ? It is recommended you use a shape factory, because it creates ports for the 2D shapes by default.



Best Regards,
Nevron Support Team


Jason Irby
Jason Irby
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
Posts: 59, Visits: 77

Sorry for the late reply.  I got caught in a release cycle.

I think I have solved my problem.

I was creating my objects from a library viewer.  The objects did have ports.  The shapes I had created the library from originally has a center port and ports around the perimeter.   I had removed all but the center port.

After some research I realized what was happening.  The center port was DynamicPort and the perimeter ports were RotateBoundsPorts.  I hadn’t realized they were different.  They seem to have slightly different stickiness.

If I made my one port a RotatedBoundsPort, it had the sticky behaviour I wanted.  If I used a  DynamicPort, it wasn’t sticky enough.  I noticed that if I changed the DynamicPort’s  glue mode from GlueToContour,  to GlueToLocation , the port became stickier.   That’s an acceptable solution for now.

 

Clear as mud?

Thanks,

Jason Irby


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search