- Welcome, Guest. Please Login or Register
MindFusion  
  Version 2 of our Xamarin Calendar component adds Resource view and support for Universal Windows Platform. Now beta testing spreadsheet component for Java Swing.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Diagramming for JavaScript, V2.8
Read 1012 times

Forum Admin   Offline
YaBB Administrator
*****
Posts: 465
Gender: male
Rock and Roll


   
     
 
Diagramming for JavaScript, V2.8
Nov 21st, 2016 at 9:08am
 
We have released version 2.8 of JavaScript Diagram library. It contains the following new features:

Fluent API
Builder objects with property setters and shortcut methods for font and brush creation add support for fluent programming style. Static With and instance init methods in DiagramItem, Style and Layout -derived classes return a builder instance that can be used to set up respective new or existing objects:
Code:
diagram.addItem(
	ShapeNode.With()
		.brush("lightGray")
		.font("Arial", 4)
		.enableStyledText(true)
		.text("Task <i>1</i>")
		.tooltip("This is the task")
		.create());

diagram.getFactory()
	.createShapeNode(20, 20, 20, 20).init()
		.brush("lightGray", "white", 20)
		.font("Arial", 4)
		.enableStyledText(true)
		.text("Task <i>2</i>")
		.tooltip("This is the second task");

diagram.arrange(
	TreeLayout.With()
		.levelDistance(20)
		.nodeDistance(20)
		.linkType(TreeLayoutLinkType.Cascading)
		.create()); 



DiagramLink improvements
  • HeadStroke, HeadStrokeThickness and HeadStrokeDashStyle properties let you customize arrowhead strokes independently of line segments strokes;
  • the AllowSelfLoops property of Diagram class controls whether users are allowed to draw self-loop links;
  • the new Spline element of LinkShape enumeration draws links as interpolating splines that pass through all of their control points:

...

Miscellaneous
  • TextAlignment and LineAlignment properties moved from ShapeNode to DiagramItem; you can now use them to set alignment for table and container captions as well;
  • enable the AllowResizeHeaders property of swimlanes Grid to let users resize grid rows and columns interactively. The control raises headerStartResizing validation event when the user tries to resize, and headerResized event when the operation completes.
  • IconSize and DefaultNodeSize properties of NodeListView can be set to null, in which case the control will use the sizes stored in node.Bounds;
  • implemented backward compatibility for XML files as old as v13 format (created by MindFusion diagram versions released in 2008);
  • the control now supports cyclic attachment created using DiagramNode.attachTo method, where moving any of the attached nodes will move all other nodes in the cycle;
  • Shape.RoundRect corner arcs keep constant radius and no longer deform when the node size changes to non-rectangular;
  • itemAdded and itemRemoved events raised when an item is added or removed, either from code or interactively;

Registered customers with an active upgrade subscription can download the licensed version from the clients area on our site.

A trial version is available for download here:
http://mindfusion.eu/JsDiagramTrial.zip

Enjoy!
 
 
  WWW
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print