Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagramming for JavaScript, V1.3 (Read 2632 times)
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 688
Joined: Apr 6th, 2003
Diagramming for JavaScript, V1.3
Feb 13th, 2012 at 11:22am
Print Post  
We have released version 1.3 of MindFusion.Diagramming for JavaScript. It contains the following new features:

Attaching and grouping items
JsDiagram allows attaching a node to another node, establishing a subordinate - master relationship between them. The easiest way to attach nodes is to call the attachTo method. When a master node is moved, all of its subordinates follow it, so that the initial distance between them stays constant. This happens both when a user moves the master node around, and when the node's position is changed using a method or a property.

Collapse and expand tree branches
If a diagram represents a tree structure, the tree branch starting from a node can be collapsed or expanded again in order to hide or display hierarchy details. To enable this, call the setExpandable method. There is a [±] button displayed beside an expandable node to allow users to collapse or expand the tree branch starting there. By default, pressing that button automatically toggles the Expanded property of the node and raises the TreeExpanded or TreeCollapsed events.

User interaction modes
Call setBehavior with one of the Behavior members as argument to specify how the diagram should handle mouse input.

DoNothing: the diagram is read-only, but nodeClicked and linkClicked events are still raised.
Modify: existing diagram items can be selected and modified, but no new items can be created interactively.
DrawLinks: existing nodes can be linked interactively, but no new nodes can be drawn.
DrawShapes: drawing with the mouse creates new ShapeNode objects; links cannot be created interactively.
LinkShapes: this is the default behavior, where drawing over an empty spot of the diagram creates a ShapeNode, and drawing over a node creates a link.

Touch input
When running under the iOS Safari web browser, the control handles one-finger touch events to allow drawing and selecting items interactively. In addition, the hit-test area around adjustment handles is larger to make touch modifications easier. Two-finger gestures are delegated to the browser - they either scroll the canvas when dragging in the same direction or zoom the page when dragging in opposite directions. The preventDefaultTouch flag can be set to false to revert to the default one-finger touch behavior (scroll the whole page).

Miscellaneous
~ The Visible property specifies whether an item should be shown on screen.
~ Validation events added: nodeCreating, linkCreating, nodeDeleting, linkDeleting, nodeModifying and linkModifying.
~ The ScrollX and ScrollY properties and scrollTo method lets you set the diagram's scroll position.
~ getViewport returns the currently visible part of the diagram.
~ setZoomFactorPivot sets the zoom level in such way that the pivot point's screen position does not change.
~ zoomToRect zooms and scrolls the view to fit the specified document rectangle in the Diagram's visible area.
~ zoomToFit zooms the view to fit the document contents into the current view size.
~ getContentBounds returns the smallest rectangle that bounds all diagram objects.
~ keepGroupLayout indicates whether to treat each group of attached nodes as a single vertex in the arranged graph.

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: 
https://mindfusion.eu/JsDiagramTrial.zip
    
Enjoy!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint