The MindFusion Forums | |
Flow Diagramming Components >> News >> Diagramming for JavaScript, V3.0
https://mindfusion.eu/Forum/YaBB.pl?num=1494259408 Message started by Forum Admin on May 8th, 2017 at 4:03pm |
Title: Diagramming for JavaScript, V3.0 Post by Forum Admin on May 8th, 2017 at 4:03pm
We have released version 3.0 of MindFusion JavaScript Diagram library. It contains the following new features and improvements:
User-interaction controllers All kinds of user interaction are now carried out by controller objects. The startDraw method of BehaviorBase-derived classes that returned an opaque InteractionState instance has been replaced by createController method returning a controller of class specific to the modified item and interaction types. Built-in controllers include CreateNodeController, CreateLinkController, ModifyNodeController, ModifyLinkController, PanController. You can also create custom controllers by deriving and overriding the methods of SinglePointerController: Code (] SinglePointerController.prototype = { start: function (position) {}, move: function (position) {}, validate: function (position) {}, commit: function (position) {}, cancel: function (position) {}, drawInteraction: function (context) {} }[/code):
where position is a Point instance specifying logical coordinates in the diagram (in current measure unit, not scaled by zoom factor). The results of called mouse methods will depend on diagram's current Behavior, e.g. you could assert that a sequence of down, move and up events creates a ShapeNode when Behavior is set to DrawShapes. Ruler control The Ruler control provides horizontal and vertical scales that help users measure and align diagram items. In order to set up a Ruler instance, create a DIV element parenting the diagram's scroller div: Code (html):
Code (javascript):
3rd party dependencies now optional The diagram can now be used without JQuery and Microsoft Ajax libraries. To enable that mode, set MindFusionImpl = "StandAloneImpl" before loading diagramming.js. Stand-alone mode requires relatively modern browsers, the base feature-set against we test it is the one of IE11. Flip shapes The shape of a ShapeNode can be flipped horizontally or vertically. Enable the AllowFlip property and the shape flips when an edge is dragged over its opposite edge. You can get or set current flip state using FlipX and FlipY properties. Revamped item dependency system Dependencies between diagram items are now expressed by rule objects and applied in sequence by the DiagramMediator class. Built-in dependencies are implemented by ItemFollowsContainerRule, AttachedFollowsMasterRule, LinkFollowsNodesRule, NodeFollowsSelectionRule rules. You can create custom rule objects with following API and add them to DiagramMediator.AllRules array to make items follow other items during user interaction - [code] var MyRule = { dependencies: function (master) {}, // return array of items that should follow master dependentUpon: function (dependency) {}, // return array of items that should be followed by dependency recognize: function (dependency) {}, // return true or false if this rule shoudl be applied on an item updateFromMasters: function (dependency, originalStates) // set new position or size of dependency }[/code] License keys There are no separate trial / licensed builds of MindFusion scripts provided anymore, instead you disable trial mode by specifying a license key string. License keys are now listed on the Keys & Downloads page at MindFusion customer portal. Copy the key to a diagram_lic.txt file in same folder where the diagram html page is located. The file name and location can be changed by calling the diagram's setLicenseLocation method. Alternatively, the key string can be set directly by calling setLicenseKey method. Miscellaneous
Registered customers with an active upgrade subscription can find license keys at the clients area on our site. A trial version is available for download here: https://mindfusion.eu/JsDiagramTrial.zip Enjoy! |
Title: Re: Diagramming for JavaScript, V3.0 Post by Slavcho on Jun 13th, 2017 at 11:34am
V3.0.1 service release is now available -
https://mindfusion.eu/JsDiagramTrial.zip
|
The MindFusion Forums » Powered by YaBB 2.6.11! YaBB Forum Software © 2000-2024. All Rights Reserved. |