Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram.LinkPen deprecated (Read 6847 times)
Sim
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Oct 8th, 2014
Diagram.LinkPen deprecated
Oct 23rd, 2014 at 12:45pm
Print Post  
Hi,

I am trying to use a custom DashPattern for my DiagramLinks. The use of Diagram.LinkPen is deprecated in my version of MindFusion.Diagramming for WinForms and I noticed that the DiagramLinkStyle does not support custom DashPatterns, it only allows you to set the DashStyle to DashStyle.Custom.

I am trying to change the DashPattern when the user sets a new default DiagramLink for drawing.
How can I change the DashPattern without using the deprecated LinkPen?

The code of the method that changes the default DiagramLink is:

Code
Select All
public void SetDefaultLink(MyDiagram diagram, MyLinkShape shape, DiagramLink link)
{
     diagram.LinkHeadShape = shape.shapeHead;
     diagram.LinkBaseShape = shape.shapeBase;
     DiagramLinkStyle style = new DiagramLinkStyle();
     style.StrokeDashStyle = DashStyle.Custom;
     //Set the DashPattern (from shape.dashPattern)
     link.Style = style;
} 

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.LinkPen deprecated
Reply #1 - Oct 23rd, 2014 at 4:30pm
Print Post  
Hi,

We have omitted adding custom pattern property to Style class, we'll try to implement it for next release. Currently you could set it through links' own Pen property, e.g. from InitializeLink event raised when the user starts drawing:

Code
Select All
private void diagram_InitializeLink(object sender, LinkEventArgs e)
{
	var pen = new MindFusion.Drawing.Pen(Color.Black, 0);
	pen.DashStyle = DashStyle.Custom;
	pen.DashPattern = new float[] { 1, 5, 5, 1 };
	e.Link.Pen = pen;
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Sim
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Oct 8th, 2014
Re: Diagram.LinkPen deprecated
Reply #2 - Oct 24th, 2014 at 6:08am
Print Post  
Thank you for your reply! Glad to hear that a replacement for the deprecated property is comming Smiley For now I'll continue to make use of the Link's Pen.
  
Back to top
 
IP Logged
 
ashwini
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 6
Joined: Mar 13th, 2015
Re: Diagram.LinkPen deprecated
Reply #3 - Mar 14th, 2015 at 3:18pm
Print Post  
Need urgent help!!

How to remove border of TableNode in Javascript. CellFrameStyle property is not available.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.LinkPen deprecated
Reply #4 - Mar 16th, 2015 at 10:10am
Print Post  
This version adds TableNode.CellFrameStyle property:
https://mindfusion.eu/_beta/jsdiag231.zip

Code
Select All
var CellFrameStyle = MindFusion.Diagramming.CellFrameStyle;
table.setCellFrameStyle(CellFrameStyle.None); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
ashwini
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 6
Joined: Mar 13th, 2015
Re: Diagram.LinkPen deprecated
Reply #5 - Mar 19th, 2015 at 12:01pm
Print Post  
Stoyo,

Urgent help!!  we dont have transparent property available for TableNode, the way we are having shapeNode.
I want to hide border of table.

thanks,
Ashwini
  
Back to top
 
IP Logged
 
ashwini
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 6
Joined: Mar 13th, 2015
Re: Diagram.LinkPen deprecated
Reply #6 - Mar 19th, 2015 at 12:45pm
Print Post  
Even we don't have image property available for TableNode in javascript framework , I want to remove all border of tableNode, including Caption border as well. CellFrameStyle is removing cells border , but not table outline border and caption border.

Please help!!.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.LinkPen deprecated
Reply #7 - Mar 19th, 2015 at 1:54pm
Print Post  
Please post in "Canvas and JavaScript" forum board. Setting brush and stroke colors to "transparent" should be close enough to the ShapeNode.Transparent property:

Code
Select All
table.setStroke("transparent");
table.setBrush("transparent"); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
ashwini
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 6
Joined: Mar 13th, 2015
Re: Diagram.LinkPen deprecated
Reply #8 - Mar 20th, 2015 at 3:17am
Print Post  
Thanks Stoyo!! It is working now. I didn't find this property in docs. Can you please share a link of any reference doc for Mindfusion with Javascript. I've found Mindfusion very strong!!

I will use Javascript forum for this. Sorry for posting my comment in wrong section.  Thanks again !
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.LinkPen deprecated
Reply #9 - Mar 20th, 2015 at 9:08am
Print Post  
Hi,

There's a CHM help file included in JsDiagram.zip where you can browse the JavaScript diagram reference, and it is also available online here:
http://www.mindfusion.eu/onlinehelp/jsdiagram/index.htm?CC_N_MindFusion_Diagramm...

Note that our help generation system cannot detect JavaScipt's prototype inheritance, so it does not list inherited members when you browser specific class' reference. If you need to find all properties supported by TableNode, you should also check the help for its base classes: DiagramNode and DiagramItem.

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