Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic JsDiagram 1.3 beta (Read 3206 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
JsDiagram 1.3 beta
Jan 31st, 2012 at 10:10am
Print Post  
We are starting beta tests of JsDiagram V1.3. The new features are:

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.

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.

If anyone is interested in trying the beta, please download this archive, which includes updated script and help files:

https://mindfusion.eu/_beta/JsDiagram.1.3.zip
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: JsDiagram 1.3 beta
Reply #1 - Feb 7th, 2012 at 11:46am
Print Post  
We have uploaded a new beta build that adds the following:

Diagram.Behavior property
Call setBehavior with one of the MindFusion.Diagramming.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;

Improved support for the Mobile Safari web browser
Now the control handles one-finger touch events to allow drawing and selecting items interactively. 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 Diagram.preventDefaultTouch flag can be set to false to revert to the default one-finger touch behavior (scroll the whole page).

Additional improvements include larger hit-test area around adjustment handles to make touch modifications easier, and better vertical centering of text labels in Safari Canvas implementation.

If anyone is interested in trying the beta, please download this archive, which includes updated script and help files:

https://mindfusion.eu/_beta/JsDiagram.1.3.zip
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint