Changes for 1.1 since 1.0.*
The latest changes are in red.
-
Incompatible change in 1.1:
- The second argument of Geometry.parse defaults to false instead of true. The first argument is assumed to be a GoJS format geometry path string, not an SVG format string, even though the SVG strings are a subset of the GoJS strings.
-
Samples and documentation:
- Added IVR Tree sample
- Added Genogram sample
- Added Comments sample
- Added Pipes sample
- Added Canvases sample
- Added Kitten Monitor sample
- Added Double Tree (JSON) sample
- Added intro page about Diagram Images
- Added intro page about Local Printing
- Added intro page about Server-side Image Creation
- Added intro page about Geometry Strings and Parsing
-
Diagram and Layer:
- New property arguments for Diagram.makeImage and Diagram.makeImageData can now specify position, size, scale, and maxSize of the resulting Diagram image.
- Added Diagram.computePartsBounds method, to determine the area occupied by a collection of Parts.
- Added Diagram.delayInitialization, replacing the now deprecated
update
andrequestUpdate
methods. - Added Diagram.zoomToRect, allowing easy changing of the viewport.
- Added Diagram.initialScale and Diagram.initialPosition, needed for more complex initialization and when Diagram.delayInitialization is used.
- Added Layer.opacity property, for setting multiplicative opacity on all Parts in a layer.
- Fixed Diagram.zoomToFit not updating the document bounds first.
- Fixed Layer.findObjectsIn not always returning the results of the navigation function.
- Fixed picking of Shapes by Layer.findObjectsIn where partial containment was incorrect.
- Fixed Diagram scrolling using PageUp/PageDown. Diagrams now scroll the correct amount regardless of scale and scroll left to right with Shift+PageUp/PageDown.
- Fixed removing a selected Part when deselecting it caused it to change layers.
-
Parts:
- Added Node.findTreeParentLink, Node.findTreeParentNode, Node.findTreeChildrenLinks, Node.findTreeChildrenNodes, for your convenience in navigating a tree-structured diagram without worrying about Diagram.isTreePathToChildren. For example, see the updated Local View sample.
- Added Link.isLabeledLink property, equivalent to
link.labelNodes.count > 0
, but more convenient. - Link.fromPortId and Link.toPortId can now be set in a Link template -- if non-empty, the property will not be set with the value of GraphLinksModel.getFromPortIdForLinkData or GraphLinksModel.getToPortIdForLinkData unless that value is non-empty.
- Improved "ChangingSelection" and "ChangedSelection" DiagramEvents not to happen when Diagram.clearSelection is called when no Parts are selected.
-
GraphObjects and Geometry:
- Added Shape.geometryString property to more easily use SVG geometry path strings in your Parts.
- Added Shape.isGeometryPositioned property to position a Shape in a Position Panel ignoring the Shape.strokeWidth.
- Added PathSegment.SvgArc enum value to allow the creation of SVG-like arcs. Additionally, Geometry.parse now parses SVG "a" commands.
- Added many "Backward..." arrowhead names, to make it easier to have double-ended arrow links. See the Arrowheads sample.
- Added Geometry.scale, Geometry.rotate, Geometry.offset, Geometry.normalize, Geometry.computeBoundsWithoutOrigin methods, for easier explicit manipulation of a Geometry.
- Added Geometry.stringify static method, as the opposite of Geometry.parse.
- Added Geometry.fillPath static method, to help convert SVG geometry path strings to GoJS.
- Fixed scaling of Geometrys that contain Bezier curves.
- Fixed some computations of Geometry.bounds that contained multiple PathFigures with arcs.
- Fixed TextBlock greeking (drawing lines instead of text at very small sizes) to be more accurately positioned.
- Improved TextBlock measurement of an empty string to have a small non-zero width, to allow empty strings to be clicked.
- Added Panel.TableRow and Panel.TableColumn Panel types, for use as elements of a Panel of type Panel.Table. These are particularly useful as the Panel type of Panel.itemTemplate.
- Added support for Panel.itemArray elements in Panels of type Panel.Spot and Panel.Auto.
- Added Panel.opacity, for affecting the opacity of the panel and all its elements.
-
Models:
- Added TreeModel to allow creating tree-structured graphs without the use of separate link data objects. Many (but not all) samples involving trees have been updated to make use of a TreeModel.
- Added GraphLinksModel.archetypeNodeData for automatically adding a node data to a GraphLinksModel when there is an unresolved reference in a link data. For example, see the updated Beat Paths sample.
- Added Model.setKeyForNodeData, to allow you to change a node data key and automatically update all references in that model using the old key value to use the new one.
- Added Iterator.first method for your convenience.
-
Layouts:
- Added Layout.isRouting property, to control whether Links are routed by the layout (default true).
- Added TreeLayout.assignTreeVertexValues overridable method, for vertex-specific control of tree layout.
- Added LayeredDigraphLayout.assignLayers overridable method, to control which layout layer each vertex should be in.
- Changed TreeLayout.path to default to new value TreeLayout.PathDefault, which chooses logical tree direction based on Diagram.isTreePathToChildren.
- Fixed alignment of vertexes in layouts that use networks to be based on center of Part.locationObject, except for Groups which align to the center of the whole Group.
-
Tools and Commands:
- Added CommandHandler.zoomToFit command, invoked by
Shift-Z
. Invoke it twice in a row to restore the original viewport. - Added InputEvent.down and InputEvent.up properties, to make it easier to distinguish between mouse-down and mouse-up and other mouse events, and between key-down and key-up events.
- Added DraggingTool.isGridSnapRealtime to control whether the grid-snapping movement of parts occurs during the drag or only upon mouse-up.
- Added DraggingTool.doDragOver, DraggingTool.doDropOnto, DraggingTool.computeMove, and DraggingTool.moveParts overridable methods, for easier implementation of custom dragging tools.
- Added LinkReshapingTool.originalPoint, LinkReshapingTool.originalPoints, ResizingTool.originalDesiredSize, ResizingTool.originalLocation, RotatingTool.originalAngle, and PanningTool.originalPosition read-only properties, for convenience when overriding some tool methods or implementing corresponding DiagramEvent handlers.
- Extended Tool.isBeyondDragSize to take two optional Point arguments, defaulting to the first and the last input points in view coordinates.
- Improved tools to select a selectable containing Group when a Part is not selectable.
- Improved ContextMenuTool.showContextMenu and ToolManager.showToolTip to set the Adornment's GraphObject.scale such that the apparent size stays the same regardless of the Diagram.scale.
- Improved RelinkingTool to disallow reconnecting not only to link label nodes on the Link itself, but also to any link label nodes on links connecting perhaps indirectly via label nodes to that Link.
- Fixed RelinkingTool to update positions of temporary nodes even before any mouse move occurs.
- Fixed ClickCreatingTool, when ClickCreatingTool.isDoubleClick, to check that both click points are close to each other.
- Fixed DragSelectingTool, when used modally, not to show the previous selection box upon mouse-down.
- Added CommandHandler.zoomToFit command, invoked by