Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic removing intermediate points on a link (Read 2249 times)
nsandhu
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Aug 22nd, 2011
removing intermediate points on a link
Oct 24th, 2011 at 7:45pm
Print Post  
I have a diagram with links that contain too many intermediate points. These points keep getting added as i pull at various points on the link, however once inserted they don't disappear even when the link is aligned to be a straight line.
I wrote a function to delete the intermediate points like so
Code
Select All
PointList controlPoints = link.getControlPoints();
controlPoints.removeRange(1, Math.max(1,link.getSegmentCount()-1));
link.updateFromPoints(true, true); 


This takes care of removing all but one of the interior points but then I lose the ability to drag the intermediate points and also the behavior of intermediate points being added goes away.

Is there a better way to do this? Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: removing intermediate points on a link
Reply #1 - Oct 25th, 2011 at 7:51am
Print Post  
Removing points interactively works fine in my test app. Could you copy here your link property values and code for validation events?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint