Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic anchorpoints get fat stroke when (Read 2913 times)
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
anchorpoints get fat stroke when
Mar 16th, 2013 at 9:29pm
Print Post  
I use this function to let the user set StrokeThickness of selected links.
diagram1.getSelection().links.forEach(function (link) {
link.setTag(t);//StrokeThickness is not savedtoxml, so save it in tag and restore when loading
link.setStrokeThickness(t);
link.invalidate();
});

When the user now selects the link from 3 to 1 (picture in attachment) and sets the strokethickness to some value (4), all the anchorpoints in the entire diagram get this strokeThickness.

It happens when I have a circular link-combination and from the link that is last made the strokethickness is changed. Not if a make a selection of links without this last-made link.

Is there a solution ?

I found when I set the StrokeThickness of a node: the anchorpoints get the same strokeThickness. Setting the strokeThickness of the node back to 1 helps, but not when the anchorpoints have become fat by making the links fat.
« Last Edit: Mar 17th, 2013 at 8:46pm by hans »  

error3.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: anchorpoints get fat stroke when
Reply #1 - Mar 18th, 2013 at 8:28am
Print Post  
Hi,

It seems strokeThickness is read by the .NET control only when using the new styling system, i.e. if you call link.style.setStrokeThickness(). Our developer will check what happens with anchor points later today, and will implement link.strokeThickness transfers too by assigning its value to link.Pen.Width on server.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: anchorpoints get fat stroke when
Reply #2 - Mar 18th, 2013 at 7:02pm
Print Post  
Hi,

It turned out to be a bug for AnchorPoints with mark shapes set to Circle not resetting the lineWidth of canvas' drawing context. You can find a fix on the PM page. It should also serialize link.strokeThickness as long as you also set link.stroke (both are necessary for creating server-side Pen object).

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint