1.x 更新日志
Changes for 1.8.38
- Fixed some apparent non-determinism in the results of LayeredDigraphLayout upon an initial layout.
Changes for 1.8.37
- Fixed an animation bug with JumpOver Links, where they improperly stored link routes during expand/collapse animations.
- Fixed a bug with inappropriate invalidation of link routes when a Group was moved.
- When supplied with an argument, CommandHandler.expandTree, CommandHandler.collapseTree, CommandHandler.expandSubGraph, and CommandHandler.collapseSubGraph incorrectly operated on the Diagram.selection if the argument Part was already in an expanded/collapsed state. This has been fixed not to do so.
- Fixes for SVG rendering of Pattern brushes.
Changes for 1.8.36
- Fixed a layout animation bug (no animation) introduced in 1.8.35 when calling Diagram.layoutDiagram>.
- Improved LayeredDigraphLayout routing when LayeredDigraphLayout.setsPortSpots is false and the nodes have no spots.
- Fixed a DataInspector extension bug, where it would not update itself when adding new properties to model data if the node did not change selection.
Changes for 1.8.35
- Fixed a bug with the LayoutCompleted DiagramEvent, which was not always firing when manually calling Diagram.layoutDiagram.
- Fixed a DraggingTool bug where dragging parts across Diagrams (or Palettes) would snap incorrectly on drop.
Changes for 1.8.34
- Fixed a bug with geometry string parsing using quadratic bezier shorthand ("T").
- Fixed setting Part.category of a Part that is not in the Diagram. This simply changes the property value without replacing the visual tree with a new copy of a template.
- Updated some outdated documentation regarding PathSegment.radiusY matching radiusX.
Changes for 1.8.33
- Fixed a bug with updating Adornments placed into non-temporary layers. Updating them might modify the parts list of that layer during iteration, causing an error.
- Documentation corrections for Tool.standardWaitAfter and Tool.doWaitAfter.
Changes for 1.8.32
- Diagram auto-scrolling now considers the document bounds of the total scrolled-to area during the auto-scroll. This makes it easy to scroll in different directions that might normally reduce the bounds during the drag.
- Fixed a bug where adornments may appear at the wrong locations when disappearing off-screen and reappearing.
- Fixed a bug with newly-copied draggable links grid snapping, and not having correct points. Also fixed some jittering while dragging links with grid snapping.
Changes for 1.8.31
- Fixed a bug rendering to SVG when an arc was the first segment of a figure and it needed an initial straight line to get to the correct starting point.
- Fixed a bug in Diagram.findObjectsNear where complete inclusions weren't always returning the proper set of objects fully enclosed within the circular area given by the point and distance parameters.
Changes for 1.8.30
- Fixed a bug with Node.collapseTree: In collapsing a circular subgraph it now correctly set Node.wasTreeExpanded on the original node, and now removes the Node's Adornments.
- Improved resizing behavior of the Overview.box to be smoother and more accurate.
- Fixed a bug with adornments not disappearing during deselection, after creating new Parts.
- Fixed a bug with Group sizing during drag-copy.
- Fixed the DiagramEvent.subject collection of a "SelectionDeleted" DiagramEvent to include connected Links.
- Fixed a bug with Group and member positioning during drag-copy, where the copy may sometimes incorrectly place the Parts relative to each other.
- The map returned by Shape.getFigureGenerators now includes string synonyms, such as "MinusLine" which references "LineH". Previously, it was only including figures directly associated with a generator function.
Changes for 1.8.29
- Fixed improper updating of Adornments of member Parts after undo or redo of ungrouping a Group.
- Group.move will not set Link.points to non-real values if the original Link position was not real. It will invalidate the route instead.
- Improved safety of layer changes during undo/redo if code has been written with layer changing side effects.
Changes for 1.8.28
- Fixed a Link re-routing bug during drags, when DraggingTool.isComplexRoutingRealtime is set to false. It would incorrectly re-compute AvoidsNodes routes during the drag if a node was crossed, instead of only deciding at the end of drag whether to re-compute.
- Fixed a drawing bug where the start of Group collapse/expand animations may draw one frame of its ending state.
- Setting Diagram.scrollMode now correctly updates the Diagram's scrollbars.
- Fixed a bug where changing the Link.fromNode or Link.toNode in a TreeModel could result in duplicate links.
Changes for 1.8.27
- Fixed a regression from 1.8.24 where some graduated panels will draw incorrectly.
- Dragging groups while DraggingTool.isGridSnapEnabled no longer snaps their members separately. This fixes some bugs where dragging a Group might shift group contents during a drag, such as links, or where Group contents may shift the Group as the placeholder is recomputed.
- Fixed Node.findLinksTo when the other port id is not null.
- Some fixes for scrollbar customization.
Changes for 1.8.26
- Fixed a regression from 1.8.24 where the opacity of objects was computed incorrectly.
- Fixed a bug where some objects resizing would not notify the Diagram.
Changes for 1.8.25
- Fixed a regression from 1.8.24 where some browsers and mice would use an incorrect wheel delta.
- Performance improvements when drawing Diagrams with large numbers of GraphObjects out of view.
Changes for 1.8.24
- Fixed an issue with scroll wheel delta when making two-finger gestures to scroll or zoom.
- Improved ToolManager.positionToolTip and ContextMenuTool.positionContextMenu when zoomed in or out.
- Performance improvements when adding large numbers of GraphObjects to Panels and when replacing a large Diagram.model. Diagram.clear now releases a few temporary references it had to old Parts in internal temporary data structures.
Changes for 1.8.23
- This bugfix potentially alters a Shape's measurements when a minSize and a strokeWidth are present: GraphObject.minSize now correctly constrains the size of Shapes. Before, the
minSize
of a shape would incorrectly subtract thestrokeWidth
. Disconnected Links now respect Part.dragComputation. This can be used to make them snap when dragging, for example with:
dragComputation: function(part, pt, gridpt) { return new go.Point(gridpt.x, gridpt.y); }
Changes for 1.8.22
- Fixed an issue where the ResizingTool wasn't respecting GraphObject.minSize and GraphObject.maxSize during uniform resizing.
- Cleaned up require syntax in the
extensionsTS
directory. - Fixed an issue with Panel.defaultSeparatorDashArray not getting used as the default value.
- Fixed resizing a nested Group with DraggingTool.isGridSnapEnabled true causing member Links to shift positions.
Changes for 1.8.21
- Fixed an issue setting certain cursors as the Diagram.currentCursor on webkit based browsers.
- Fixed a bug where updating the Link.fromShortLength or Link.toShortLength weren't properly updating the link's geometry.
- Self-links that are rendered as bezier loops no longer include resegmenting handles.
Changes for 1.8.20
- Diagram.zoomToFit and CommandHandler.zoomToFit now re-position the diagram upon zoom, even if the Diagram.scrollMode is set to Diagram.InfiniteScroll.
Changes for 1.8.19
- Enabled two-finger zooming on MacBook trackpads.
- Fixed half-disconnected link routing bug involving "...Side" Spots for Nodes that are members of Groups.
- Improved LayeredDigraphLayout alignment of nodes linked to visible nodes inside groups.
Changes for 1.8.18
- Fixed the implementation of some Arc paths in Diagram.makeSVG.
Changes for 1.8.17
- Return values from TextBlock.graduatedFunction will now be converted to strings for safety.
- Fixed a regression for scroll-wheel zooming that was introduced in 1.8.15.
- Fixed error about showing a context menu Adornment when that same context menu is being shown in another Diagram.
- The TextEditingTool now sets its height via the number of
textarea.rows
, instead of estimating text height and setting CSS height style. - Fixes to TextEditingTool, including a positioning fix in IE11.
Changes for 1.8.16
- Group.layout setter now correctly triggers a relayout, if the newly assigned layout is invalid.
- Fixed a bug with scrollbar values after some initial layouts.
- Fixed a bug with InputEvent.viewPoint on Diagram.lastInput when dragging between Diagrams.
- Fixed a drawing bug with separator dash arrays, affecting RowColumnDefinition.separatorDashArray, Panel.defaultColumnSeparatorDashArray, and Panel.defaultRowSeparatorDashArray.
Changes for 1.8.15
- Link Adornments can now be of any Panel type. They are still forced into the type Panel.Link if the Part.selectionObjectName is unspecified or is an empty string, or if it refers to the Link.path.
- Using the wheel to scroll while the mouse is over the scroll-bar now correctly scrolls the Diagram.
Changes for 1.8.14
- CommandHandler.canPasteSelection now returns
false
if there are zero parts in the clipboard. - Fixes for Link Adornment sizing.
Changes for 1.8.13
- Fixed DraggingTool.doMouseMove to respect settings of Diagram.currentCursor in GraphObject.mouseDragEnter event handlers.
- Adding or removing reflexive links at a node when there are multiple such links at that node no longer cause their routes to be invalidated if Link.adjusting is not Link.None.
- The default text editor's main element no longer erases all CSS Styling on activation. This allows you to set style by writing, for example:
TextEditingTool.defaultTextEditor.mainElement.style.backgroundColor = 'red';
Changes for 1.8.12
- Added search functionality for classes and members in the API documentation.
- Fix for Geometry.parse when numbers containing alphabet characters (such as
4E-06
) are present. - Updated Geometry.parse to accept multiple '.'s without spaces to allow for chaining decimals, for example
1.5.75.75
. The result would be1.5 .75 .75
, as specified by the SVG grammar.
Changes for 1.8.11
- Fixed a check for
window.navigator.msPointerEnabled
that was modified in 1.8.8. This was disabling Pointer Events in IE based browsers.
Changes for 1.8.10
- Improved wheel events, primarily for Firefox and Firefox for Android. Mac trackpads will now pan and scroll in both directions in Firefox.
- Fixed a bug with links not rerouting during a drag of a collapsed group. This occurred when a link was connected to a "...Side" Spot of a member node.
- Fixed a shadow regression introduced in 1.8.9.
- Some licensing fixes for versions of IE.
Changes for 1.8.9
- Fixed a bug in Diagram.findObjectsNear in Table Panels using TableRow and TableColumn.
- Fixed a drawing bug where some GraphObjects with a background set would be shadowed, when they should not be.
Changes for 1.8.8
- Added an Introduction page about debugging: Debugging
- Fixed a check for
window.navigator.msPointerEnabled
that was added in 1.8.5. - Fixed UndoManager.canUndo and UndoManager.canRedo to ignore UndoManager.isUndoingRedoing.
- The Server-side Images Intro page now contains examples using Puppeteer.
Changes for 1.8.7
- Fixed routing of AvoidsNodes Links when added as members of a Group that hadn't been measured fully yet with its new members.
- Fixed Layout.doLayout, the default layout that only positions nodes that do not have a real Part.location, to respect the pre-layout position of Groups, when the Group.layout has not been set.
- Improved LinkingBaseTool.isValidCycle to guess whether LinkingTool.archetypeLinkData will create a new Link that is not Link.isTreeLink, which affects link validity when Diagram.validCycle is Diagram.CycleDestinationTree or Diagram.CycleSourceTree.
- Increased the CSS z-index of the default touch context menu from 300 to 10002.
- For Table Panels and RowColumnDefinitions: Before, a separator would exist and take up space for every row and column except index = 0. Now they exist and take up space for every row and column except the first row and column, whatever its index may be.
Changes for 1.8.6
- Added ForceDirectedLayout.moveLimit property.
- Event bubbling fixes for PointerEvents in IE and Edge.
Changes for 1.8.5
- IE: Fixed a regression from 1.8.3 with PointerEvents: Mouse-based events now correctly report their button (left, right middle) and modifier keys (Ctrl, Alt, etc). Additionally, meta keys now work with touches, so users can do actions such as CTRL+touch to select multiple nodes.
- Fixed a bug with shadows in IE (but not Edge) sometimes causing draw-related errors with the Canvas Context.
- The user of
PointerEvents
is additionally limited bywindow.navigator.msPointerEnabled
not being false. This supports the use of IE 11 when embedded within Windows applications. - Fixed an animation regression that began with 1.7.0: resizing Diagram DIVs now correctly animates layouts that have Layout.isViewportSized set to true.
Changes for 1.8.4
- Added Diagram.scrollsPageOnFocus property, to control whether the page scrolls to show the Diagram's HTMLDivElement when the diagram receives focus, if the element is not entirely visible in the window. For compatibility now the default value is true, but the default value will be false in version 2.0.
- Fixed a regression from 1.7.28/1.7.29 with starting automatic animations.
- Fixed an animation positioning bug with nested collapsed groups.
Changes for 1.8.3
- Added the Zoom Pinch sample, demonstrating gesture customization.
- Internally, browser PointerEvents are now used by default on IE-related browsers, when possible. Other browsers still use Touch and Mouse events.
- Fixed a measurement bug with GraphObject.maxSize when applied to TextBlocks.
- Fixed another case of moving Groups not correctly invalidating link routes when the link connects with the group.
- Fixed having UndoManager.isUndoingRedoing to be consistently true during "StartingUndo", "StartingRedo", "FinishedUndo", and "FinishedRedo" Model ChangedEvents of type Transaction.
- Fixed hit testing in some edge cases for geometries.
Changes for 1.8.1 and 1.8.2
- Fixed the measurement of GraphObjects with GraphObject.isPanelMain in Links and Auto panels.
- Improved documentation and samples for GoCloudStorage.
Changes for 1.8 since 1.7.*
- Licensing
Improvements for unlimited-domains OEM customers.
- Samples and documentation:
- Added GoCloudStorage classes, in the
storage
folder, for saving/loading models from various cloud storage provider services pluslocalStorage
.An example of using these services is at: Go Cloud Storage Manager.
The API documentation is at Storage API.
Load the library from Storage library. You will also need to load the libraries for each of the services themselves (other than localStorage).
The source code is at GoCloudStorage.ts and in other files in that folder.
- Typescript definition file (
go.d.ts
) fixes.
- Added GoCloudStorage classes, in the
- Diagram and Model:
- Added Diagram.commit and Model.commit, which call a given function wrapped in a transaction. This is offered as a concise alternative to calling
startTransaction
andcommitTransaction
. - Added Model.set as a synonym for Model.setDataProperty.
- Added Diagram.commit and Model.commit, which call a given function wrapped in a transaction. This is offered as a concise alternative to calling
- Parts:
- Tools:
- Fixed duplicate calls to focus within the TextEditingTool.
- Deprecated features:
These features will remain in the library until version 2.0, but they will no longer be documented and their use is discouraged.
- Most Predefined Shape figures
In order to shrink the size of the GoJS library we will be not be defining most predefined figures in the library. Instead, you can find all of their definitions in the Figures.js file. You can simply load only those figures that you want to use by copying their definitions into your code.
Until version 2.0 all of the predefined figures remain defined in the GoJS library, so you do not yet have to load any figures from the extensions file. However, a number of very common figures will remain predefined even in version 2.0. The figures that will remain in 2.0 are: "Rectangle", "Square", "RoundedRectangle", "Border", "Ellipse", "Circle", "TriangleRight", "TriangleDown", "TriangleLeft", "TriangleUp", "Triangle", "Diamond", "LineH", "LineV", "BarH", "BarV", "MinusLine", "PlusLine", "XLine".
Note also that the definitions that are in the Figures.js file are not entirely the same as their current definitions in the library. A number of figures have been improved and some figure parameters have changed meaning.
- DiagramEvent.cancel
The only use for this property was with the "SelectionDeleting" DiagramEvent in order to prevent the user from deleting the selection. Where one might have written this Diagram listener:
"SelectionDeleting": function(e) { if (e.diagram.selection.any(function(p) { return p.data.key.indexOf("e") >= 0; })) { e.cancel = true; } },
one can write the equivalent functionality with this CommandHandler.canDeleteSelection method override:"commandHandler.canDeleteSelection": function() { return !this.diagram.selection.any(function(p) { return p.data.key.indexOf("e") >= 0; }) && go.CommandHandler.prototype.canDeleteSelection.call(this); },
Overriding the method supports the updating/enablement of commands that call CommandHandler.deleteSelection. Furthermore not having a "cancel" property on the DiagramEvent avoids any potential problems that might occur if there are multiple listeners for the "SelectionDeleting" event. The "SelectionDeleting" DiagramEvent remains useful, but not for controlling whether or not the deletion should happen.
- GraphObject.fromEndSegmentDirection and GraphObject.toEndSegmentDirection
These properties have not been useful. One can override Link.getLinkDirection to achieve the same effects.
- TextEditingTool.doFocus and TextEditingTool.doBlur
These undocumented properties were used to modify the default functionality of the TextEditingTool. That is now done by setting TextBlock.defaultTextEditor to an instance of HTMLInfo (new in 1.7).
For examples, see Custom TextEditingTool sample and Text Editor default implementation extension.
- TextBlock.textEditor, TextEditingTool.defaultTextEditor, and TextEditingTool.currentTextEditor
These properties are now primarily used with HTMLInfo values. HTML Elements will still work until version 2.0.
- Most Predefined Shape figures
Changes for 1.7.29
- Fixed a case of missing layout animation.
Changes for 1.7.28
- Typescript definition fixes.
- When Part.move is called as
Group.move
, the method no longer invalidates Link routes inside the group. - Fixed regression in 1.7.23 with performing extra layouts involving nested Groups resulting in duplicate Transactions.
Changes for 1.7.27
- Fixed TextEditingTool sometimes incorrectly ignoring non-TextBlocks in front of a TextBlock.
- Fixed RelinkingTool.copyLinkProperties to include copying the Link.points, so that when Link.adjusting is not None the behavior will be the same as for the original Link.
- Improved AvoidsNodes link routing to be more likely to find a shorter route by looking beyond the area of the two connected nodes.
- Improved link routing during DraggingTool moves to keep link routes while snapping is enabled.
Changes for 1.7.26
- Fixed a regression when drawing large images scaled down, introduced in 1.7.21.
Changes for 1.7.25
- Replaced the Angular 2 project with a newer Angular 4 project, at
projects/angular-basic
. This projected was created with Angular CLI; we then added adiagram-editor
Component consisting of a Diagram and a Palette. That component takes a Model as an Input and producesnodeSelected
andmodelChanged
as Outputs. The main app component shows editable details for the primary selection if it is a Node. - Automatically redraw with improved sharpness as the user zooms the page.
- Fixed a bug where Pictures given a GraphObject.maxSize and no loaded Picture.element or Picture.source would measure incorrectly.
Changes for 1.7.24
- Fixed a regression introduced in 1.7.18 with pinch-zooming on Microsoft touch devices in IE.
- Fixed a visibility bug when a non-visible Part switches layers.
- Events on the Diagram now attempt to find the Event target Diagram differently. This may help in libraries that use a shadow DOM or DOM scoping.
Changes for 1.7.23
- Fixed a bug with SVG generation. Generated
<svg>
tags also now specify aviewBox
attribute.
Changes for 1.7.22
- Improved routing of links to non-visible member nodes of collapsed groups, when the spots of the group's default port are different than thespots of the non-visible node that the link is connected with.
- Diagram mouseOut now appropriately calls Tool.standardMouseOver, and Tool.standardMouseOver uses null as the current object if the mouse is not over the current Diagram.
- For wrapping, TextBlocks respect the maxSize of their Panel, but also accidentally conformed to their Panel's minSize.
- Diagram keyDown used to always preventDefault on keyDown events, but this is now overridable via InputEvent.bubbling.
Changes for 1.7.21
- Drawing fix for HTMLVideoElement sources to Picture.element, which were broken in 1.7.5.
- Fix for the main element of a Panel (when using GraphObject.isPanelMain) sometimes getting cached incorrectly.
Changes for 1.7.20
- Fixed Panel.rebuildItemElements not to remove any Links that were connected with item elements that are ports.
- Fixes for link routing during animation.
- Fixed slight shifting of Groups that have Group.layout being a CircularLayout after repeated layouts, including after expanding the subgraph.
Changes for 1.7.19
- Added the Vue.js sample, demonstrating a simple GoJS app in the Vue.js framework.
- Fixed a bug in DraggingTool.moveParts where it was incorrectly shifting Nodes when Nodes shifted by differing amounts.
- Extended RotatingTool to work on link labels; the user still cannot rotate whole Links or the Link.path.
- Restored behavior from 1.6 of Model.fromJson such that
linkdata.points
property value is of type List. Version 1.7 had allowed that property to remain as an Array of numbers. - When a Group.layout> was a CircularLayout, that layout was not respecting the implicit Layout.arrangementOrigin provided by the group by calling and remembering Layout.initialOrigin.
- Fixed Link arrowhead and Link label positioning when the object to be positioned is scaled.
Changes for 1.7.18
- Improved multi-finger touch handling while doing single-finger operations, like dragging and panning.
- Fixed a bug where collapsing a Group in a LayeredDigraphLayout could cause incorrect routes for bezier links to member nodes.
- Diagram.makeSVG will now wrap the outputted TextBlock
<text>
s with<g>
if the TextBlock has multiple lines of text.
Changes for 1.7.17
- Fixed a bug in Grid Panel where it might not draw the last horizontal grid line.
- More extensions translated into TypeScript, at ExtensionsTS.
- Table Panels now allocate space to elements with a GraphObject.stretch value that also span multiple rows or columns in a more consistent fashion.
- Shapes inside a Grid Panel now respect GraphObject.opacity values.
- Label Nodes on labeled Links now are members of the link's containing Group, if any.
- Fixed a bug where if multiple Diagrams shared a Picture, they might not all be redrawn properly upon the image element loading or erroring.
Changes for 1.7.16
- Translated and modularized the extensions into TypeScript
*.ts
files, in theextensionsTS
directory. The compiled files are present in that directory as*.js
files, which can be required or imported even if you are not using TypeScript. (Caution: all of the script in the HTML samples in theextensions
directory have been split out into...Script.ts
files, so try not to be confused by the corresponding*.js
files, which will haveScript
in their names.) - Fixed missing calls to Node.linkConnected and Node.linkDisconnected event handlers when connecting or disconnecting reflexive links.
- Fixed error in Model.applyIncrementalJson adding group nodes.
Changes for 1.7.15
- Fixed scrollbar behavior when Diagram.scrollMargin was set.
- Fixed ResizingTool not re-routing reflexive links on Groups.
Changes for 1.7.14
- Avoided undesired side effects of undo and redo after relinking duplicate links.
- Further improved the dragging between Diagrams that was modified in 1.7.13.
Changes for 1.7.13
- Fixed a bug with pinch-zooming in some browsers.
- Fixed a regression with Diagram.makeSVG not including CORS-disabled images.
- Fixed a bug with the TextEditingTool when using custom HTML text editors. The code attempted to call
editor.focus()
andeditor.setSelectionRange()
before the editor was added to the DOM. This problem does not affect HTMLInfo, only HTML Element text editors. - Improved dragging of nodes from a Diagram or Palette onto an empty Diagram without a new model.
Changes for 1.7.12
- Added the Non Realtime Dragging sample, demonstrating how to customize the DraggingTool to have users drag around a translucent image of the selection, rather than actually moving those Nodes and Links, until the mouse up occurs. This makes use of the NonRealtimeDraggingTool.js extension.
- The DraggingTool will now initiate auto scroll of the Diagram even if Diagram.allowMove and Diagram.allowCopy are false.
- Link labels along multi-segmented links with unspecified GraphObject.segmentIndexes will now have more accurate angles.
- Fixed a bug with TextBlocks when TextBlock.wrapping was set to TextBlock.None, it would size itself only by the last line.
Changes for 1.7.11
- Fixed a bug in the TextEditingTool when editing TextBlocks with a non-default TextBlock.textAlign value.
- Fixed some Diagram construction orders not respecting screen pixel ratios.
- Fixed a DraggingTool bug when dragging disconnected links between Diagrams, when the destination Diagram had Diagram.allowCopy set to false.
- Fixed faulty locations when Part.locationSpot or Part.locationObjectName were modified when a Part was transformed (angle or scale).
Changes for 1.7.10
- Fixed routing of Links to rotated nodes with "...Side" Spots.
- Fixed routing of Link.AvoidsNodes Links that also had Link.adjusting set to Link.End.
Changes for 1.7.9
- Added the Parallel Route sample, demonstrating a custom Link.computePoints method in order to have multiple links between the same two ports have parallel segments. This makes use of the ParallelRouteLink.js extension.
- Fixed some instances of ticks not rendering on Graduated Panels with small Panel.graduatedTickUnit values.
Changes for 1.7.8
- Added the Link Label On Path Dragging sample, demonstrating how to restrict the dragging of link labels to remain on the path of the link. This makes use of the LinkLabelOnPathDraggingTool.js extension.
- TableRows and TableColumns now update their ports correctly when scrolling by setting Panel.topIndex or Panel.leftIndex.
- Links that have TwoWay Bindings of Link.points now copy faithfully between different Diagrams.
- When the DraggingTool.dragsLink is true, a drag of a Link that reconnects one or both ends of the Link will now raise one or two "LinkRelinked" DiagramEvents. Just as with a "LinkRelinked" event raised by the RelinkingTool, the DiagramEvent.parameter will be the old port with which the Link had been connected.
Changes for 1.7.7
- Added the Tri-state CheckBox Tree sample, demonstrating checkboxes for each item in a "tree view".
- Improved the performance of link routing when groups have a lot of member nodes and links.
- Fixed shadow scaling when making images.
Changes for 1.7.6
- Added the RoundedRectangles.js definitions of figures that have rounded corners only at the top or only at the bottom.
- Added the Rounded Groups sample demonstrating both Nodes and Groups that have rounded headers and rounded footers.
- Added the Two Halves sample demonstrating a Node template that has both a top half and a bottom half and that has rounded corners overall.
- Fixed cases where InputEvent.left remained true for mouse move events even after the left mouse button was released.
Changes for 1.7.5
- Added the Minimal SVG Download sample, demonstrating Diagram.makeSvg and "downloading" the resulting SVG file.
Changes for 1.7.4
- Added the Sector Reshaping sample, demonstrating a custom Tool that supports interactively changing the angle and breadth (sweep) and depth (radius) of a pie-shaped sector of a circle. The SectorReshapingTool is defined in the SectorReshapingTool.js file in the Extensions directory.
- Fixed broken Diagram.makeImageData for "blob" return type.
Changes for 1.7.3
- Added the
angular2-minimal
project, in the projects subdirectory. This is a copy of the Angular 2 Quick Start example, https://angular.io/docs/ts/latest/quickstart.html, augmented to show the GoJS "minimal" sample. - Fixed another declaration in
go.d.ts
.
Changes for 1.7.2
- Fixed missing declaration in
go.d.ts
.
Changes for 1.7.1
- Fixed some corrupted image files in the samples.
- Renewed a Leaflet access token for the Leaflet sample.
GoJS version 1.7 brings several new features and samples. Here are some highlights:
- From GoJS 1.7 onward there is a new method of licensing that does not require a separate
go.js
file download, instead it uses a license key. Read more on the Deployment Intro page. - Added a new sample: Floor Planner in the extensions folder.
- More intelligent link routing: GoJS now attempts to preserve Link routes when elements of a Node resize or move, but do not affect the link ports.
- Improved support for customizing tooltips, context menus and the TextEditingTool using a new class: HTMLInfo, which contains methods to show and hide custom HTML. HTMLInfo can be assigned as a value of GraphObject.contextMenu, Diagram.contextMenu, GraphObject.toolTip, Diagram.toolTip, or TextBlock.defaultTextEditor. Read more on the HTML Interaction Intro page.
- New Panel.type: Panel.Graduated, used to draw regular tick marks and text along a main Shape element. Read more on the Graduated Panels Intro page.
- Added the Panel.isEnabled property, the GraphObject.isEnabledObject method, and the GraphObject.enabledChanged event.
- Added the Panel.isClipping property, which allows Spot Panels to designate their main Shape element as a clipping region instead of a drawn Shape.
- Added Brush methods for computing lighter or darker colors or Brushes.
- Added Binding.ofModel method, to support data binding of GraphObject properties to data properties that are on the Model.modelData shared JavaScript Object.
Changes for 1.7 since 1.6.*
- Samples and documentation:
- Copied definitions for all Shape.figure figures to the Figures.js file. All of the old figures are still predefined, so you will not need to load any section of this file. This file provides information about how each figure is defined, so that you can customize them or copy-and-adapt them.
- Copied definitions for all predefined templates to the Templates.js file in the Extensions directory. The predefined templates are still predefined, so you will not need to load this file in order to use those definitions. This file provides information about how each template is defined, so that you can customize them or copy-and-adapt them.
- Added a new sample: Floor Planner in the extensions folder.
- Added the Custom Expand Collapse sample, demonstrating an alternative to the "TreeExpanderButton" and the use of the Node.isTreeExpanded. This sample is tolerant of cycles in the graph.
- Added the Hyperlink sample, demonstrating a "HyperlinkText" GraphObject builder that implements a standard hyperlink or "HTML anchor" control. The "HyperlinkText" builder is defined in the HyperlinkText.js file in the Extensions directory.
- Added the Org Chart Assistants sample, demonstrating a custom TreeLayout that positions "assistant" child nodes to the side, above the regular child nodes.
- Added the Radial Layout extension class, used by the Recentering Radial sample and the Radial Partition sample.
- Added several new HTML pages that showcase existing extensions as standalone samples: Draw CommandHandler Geometry Reshaping, Guided Dragging, HyperLink, Local Storage CommandHandler, Resize Multiple, Rotate Multiple.
- Added the HTML Light Box Context Menu sample, a re-implementation of the default touch context menu using HTMLInfo, and references LightBoxContextMenu.js and LightBoxContextMenu.css.
- Added the Text Editor sample, a re-implementation of the default text editor using HTMLInfo. It uses the TextEditor.js extension.
- Reworked the CustomTextEditingTool sample to use two HTMLInfo instances, defined in TextEditorRadioButtons.js and TextEditorSelectBox.js.
- Reworked the Timeline sample to use a Graduated Panel. Added several samples demonstrating Graduated Panels: Thermometer, Instrument Gauge, Rulered Diagram,
- Diagram and Layer:
- Enhanced the "ViewportBoundsChanged" DiagramEvent to provide the previous Diagram.scale as the "scale" property of the DiagramEvent.subject; the previous Diagram.position is available as the "position" property of that subject, and the previous Diagram.viewportBounds is also available as the "bounds" property of that same subject.
- Enhanced Diagram.computePartsBounds to take optional argument whether to include the bounds of all Links in the given collection.
- Diagram.makeImageData has a new option,
returnType
, which allows you to specify astring
(default),ImageData
(new), orBlob
(new) as the returned type. Diagram.makeImageData also has a new optioncallback
which is used in conjunction withreturnType: "Blob"
. See the Minimal Image Blob Download sample for usage details. - Parts that are added and selected or highlighted, and then are removed upon an undo, no longer remain selected or highlighted. This policy avoids having non-existent nodes and links (due to undo of their insertion) remaining in the Diagram.selection or Diagram.highlighteds collections.
- Extended Diagram.findPartForKey to return Links if the Diagram.model is a GraphLinksModel that is keeping keys for link data. If GraphLinksModel.findLinkDataForKey returns a link data object, Diagram.findPartForKey may return the corresponding Link.
- Parts:
- Added Node.findTreeParentChain method, to return a collection of the Nodes and Links following links up to a root node.
- GoJS now attempts to preserve Link routes when elements of a Node resize or move but do not affect the absolute position of ports.
- Improved Orthogonal Link routing for links coming out of and going into the same port.
- Link.AvoidsNodes routing when Link.adjusting is Link.End now tries to preserve earlier routing not near the end(s) of the route that were adjusted.
- Link.AvoidsNodes routing may be more likely to turn immediately when Node.avoidable Nodes overlap either or both ports.
- Added Part.highlightedChanged, when one wants to modify the appearance of a Part in a manner that is inconvenient to implement using data Binding.
- Panels
- Added the Panel.isEnabled property, the GraphObject.isEnabledObject method, and the GraphObject.enabledChanged functional property, for use by Panels such as "Button"s that are GraphObject.isActionable, to control whether or not the user may click them.
- Added the Panel.isClipping property, which allows Spot Panels to designate their main Shape element as a clipping region instead of a drawn Shape.
- Added the Panel.isOpposite property, which allows Horizontal and Vertical panels to arrange their contents from the right and bottom side (respectively) instead of the top and left side.
- Added the Panel.alignmentFocusName property, which allows elements of Spot Panels to name a nested Element to be the alignment object instead of the Panel.
- Added the new Panel.type: Panel.Graduated, used to draw regular tick marks and text along a main Shape element. Read more on the Graduated Panels Intro page.
- Added Panel.graduatedMin, Panel.graduatedMax, Panel.graduatedRange, Panel.graduatedTickUnit, Panel.graduatedTickBase, Panel.graduatedPointForValue, Panel.graduatedValueForPoint, Shape.graduatedStart, Shape.graduatedEnd, TextBlock.interval, TextBlock.graduatedStart, TextBlock.graduatedEnd, and TextBlock.graduatedFunction, all for use with Graduated Panels.
- Improved the "PanelExpanderButton" to work in nested Panel.itemTemplates.
- GraphObjects and Geometry:
- Added Picture.successFunction, a function called when the Picture's image loads successfully.
- Added Picture.imageAlignment, a Spot to align the source image to, when the source image is smaller than the Picture.
- Added TextBlock.verticalAlignment, which controls the vertical position of the glyphs when the TextBlock has more available vertical space than it needs for drawing.
- Added TextBlock.textEdited, a settable function that is called on a TextBlock when the TextEditingTool is completing.
- Added TextBlock.choices, a settable/bindable Array that can help implement custom TextEditingTools. See the Custom TextEditingTool Sample.
- Added TextBlock.interval, TextBlock.graduatedFunction, TextBlock.graduatedStart, TextBlock.graduatedEnd for use in "Graduated" Panels to implement scales, gauges, rulers, and similar devices.
- Added Shape.graduatedStart and Shape.graduatedEnd for use in "Graduated" Panels.
- Added Brush.lightenBy and Brush.darkenBy instance and static methods, which lighten or darken colors in a Brush or a CSS color string. There are also convenience methods Brush.lighten and Brush.darken which provide default behavior.
- Extended Placeholder.padding to allow negative values.
- Extended GraphObject.getDocumentPoint to take a Point in local coordinates, as well as a Spot in this GraphObject. This is for convenience and clarity the opposite transformation performed by GraphObject.getLocalPoint.
- Added support for zero-width spaces and soft hyphens wrapping lines in TextBlock.
- Models:
- Added Binding.ofModel method, to support data binding of GraphObject properties to data properties that are on the Model.modelData shared JavaScript Object.
- Enhanced Diagram.updateAllRelationshipsFromData to also add and remove Nodes and Links for any additional and missing data in the model. Remember that it is more efficient to call methods on the model to modify it and also notify all diagrams about the change than it is to call Diagram.updateAllRelationshipsFromData. Calling methods such as Model.addNodeData and Model.setDataProperty also have the benefit of supporting undo/redo -- the "update..." methods do not.
- It is now possible for a TwoWay Binding in an item template to replace an item in the Panel.itemArray. For an example, please see the updated documentation for the Binding class.
- A third argument, the Model, is now passed to back-converter (source-to-target) functions in TwoWay Bindings. This permits access to the model from the data object without having to explicitly add a reference to the model in each data object. Such an argument is not needed for the regular source-to-target converters because one can always walk up the visual tree of GraphObjects via GraphObject.part, GraphObject.panel, or GraphObject.diagram.
- Fixed a call to Model.removeNodeData not potentially invalidating a Layout.
- Layouts:
- Added the Layout.collectParts method, a convenience method to be called by overrides of Layout.doLayout to process the argument in order to get a collection of Parts that should be laid out by that custom Layout, when not using a LayoutNetwork.
- Tools and Commands:
- Added new class HTMLInfo, which contains methods to show and hide custom HTML. HTMLInfo can be assigned as a value of GraphObject.contextMenu, Diagram.contextMenu, GraphObject.toolTip, or Diagram.toolTip. Read more on the HTML Interaction Intro page. For examples, see:
- Text Editors: Custom Text Editors sample and Re-implementation of the default Text Editor
- Context Menus: Custom Context Menu and HTML Lightbox Context Menu (a re-implementation of the default touch context menu)
- Tooltips: Data Visualization Tooltip
- Added TextEditingTool.state and TextEditingTool.measureTemporaryTextBlock that can be used by custom HTMLInfo text editors.
- Added the ContextMenuTool.defaultTouchContextMenu property, which is an instance of HTMLInfo by default. This may be set to another instance of HTMLInfo, or may be set to null to disable the default touch context menu.
- Extended the DragSelectingTool to auto-scroll when the mouse point is just within the edge of the viewport.
- Added the overridable method LinkingTool.doNoLink, which is called when a mouse up during a linking operation does not actually draw a new Link.
- Added the overridable method RelinkingTool.doNoRelink, which is called when a mouse up during a relinking operation does not actually reconnect the Link.
- Improved the LinkingTool and RelinkingTool to auto-scroll during a linking operation even when snapped to a valid target port.
- Added the overridable method ResizingTool.computeReshape, to make it easier to change when the user may change the aspect ratio of the object being resized.
- Fixed the ResizingTool to work better when resizing rotated parts. Potentially Incompatible: Previously the Part.locationSpot would determine where an resizing object expanded or contracted from. Now, resizing objects always resize from their dragged handle, so that the opposite handle always stays in place.
- Added TextEditingTool.DoubleClick as an additional option for TextEditingTool.starting.
- CSS Style incompatibility: The TextEditingTool.defaultTextEditor Input element is no longer given the CSS class "start". This CSS class had been undocumented and unsupported.
- CSS Style incompatibility: The default context menu used the classes "defaultCXul", "defaultCXli", and "defaultCXa", they have been renamed "goCXul", "goCXli", and "goCXa", respectively. These CSS classes had been undocumented and unsupported.
- Added new class HTMLInfo, which contains methods to show and hide custom HTML. HTMLInfo can be assigned as a value of GraphObject.contextMenu, Diagram.contextMenu, GraphObject.toolTip, or Diagram.toolTip. Read more on the HTML Interaction Intro page. For examples, see:
- Deprecated features:
These features will remain in the library until version 2.0, but they will no longer be documented and their use is discouraged.
- Most Predefined Shape figures
In order to shrink the size of the GoJS library we will be not be defining most predefined figures in the library. Instead, you can find all of their definitions in the Figures.js file. You can simply load only those figures that you want to use by copying their definitions into your code.
Until version 2.0 all of the predefined figures remain defined in the GoJS library, so you do not yet have to load any figures from the extensions file. However, a number of very common figures will remain predefined even in version 2.0. The figures that will remain in 2.0 are: "Rectangle", "Square", "RoundedRectangle", "Border", "Ellipse", "Circle", "TriangleRight", "TriangleDown", "TriangleLeft", "TriangleUp", "Triangle", "Diamond", "LineH", "LineV", "BarH", "BarV", "MinusLine", "PlusLine", "XLine".
Note also that the definitions that are in the Figures.js file are not entirely the same as their current definitions in the library. A number of figures have been improved and some figure parameters have changed meaning.
- DiagramEvent.cancel
The only use for this property was with the "SelectionDeleting" DiagramEvent in order to prevent the user from deleting the selection. Where one might have written this Diagram listener:
"SelectionDeleting": function(e) { if (e.diagram.selection.any(function(p) { return p.data.key.indexOf("e") >= 0; })) { e.cancel = true; } },
one can write the equivalent functionality with this CommandHandler.canDeleteSelection method override:"commandHandler.canDeleteSelection": function() { return !this.diagram.selection.any(function(p) { return p.data.key.indexOf("e") >= 0; }) && go.CommandHandler.prototype.canDeleteSelection.call(this); },
Overriding the method supports the updating/enablement of commands that call CommandHandler.deleteSelection. Furthermore not having a "cancel" property on the DiagramEvent avoids any potential problems that might occur if there are multiple listeners for the "SelectionDeleting" event. The "SelectionDeleting" DiagramEvent remains useful, but not for controlling whether or not the deletion should happen. - GraphObject.fromEndSegmentDirection and GraphObject.toEndSegmentDirection
These properties have not been useful. One can override Link.getLinkDirection to achieve the same effects.
- TextEditingTool.doFocus and TextEditingTool.doBlur
These undocumented properties were used to modify the default functionality of the TextEditingTool. That is now done by setting TextBlock.defaultTextEditor to an instance of HTMLInfo (new in 1.7).
For examples, see Custom TextEditingTool sample and Text Editor default implementation extension.
- TextBlock.textEditor, TextEditingTool.defaultTextEditor, and TextEditingTool.currentTextEditor
These properties are now primarily used with HTMLInfo values. HTML Elements will still work until version 2.0.
- Most Predefined Shape figures
Changes for 1.6.24
- Fixed an infinite recursion when a Link with a label Node connects with that same node.
- Fixed a case of AnimationManager retaining references to Parts that were not cleared by Diagram.clear.
Changes for 1.6.23
- Fixed a bug with Picture.sourceCrossOrigin setting the CORS flag too late. Some browsers require it be set before an image source is set.
- Fixed a bug in recent Chrome browsers and Edge where shift-scroll-wheel did not scroll horizontally.
Changes for 1.6.22
- Fixed lack of jump-over or jump-gap when link routes have only two points.
Changes for 1.6.21
- Overviews are notified at the end of animations, in case they need to update their bounding box.
- Fixed a scrollbar issue when using initalAutoScale and resetting the diagram or loading a new model.
- Fixed link label positioning in certain cases where GraphObject.alignmentFocus and GraphObject.segmentOrientation are both set.
Changes for 1.6.20
- Fixed a measuring issue with GraphObject.desiredSize when the old size matches the new size.
- Fixed an animation issue with Group subgraph collapsing, when the member Nodes have a locationSpot set.
Changes for 1.6.19
- Shapes with a custom Geometry no longer lose their custom geometry when GraphObject.desiredSize is set to NaN. Shapes also rebuild custom geometries more accurately when reshaped or scaled.
- A Group whose Group.layoutis a LayeredDigraphLayout is less likely to move after repeated cycles of collapsing and expanding.
- Fixed an animation issue when there are multiple animations bundled together, and the last one does not add any animatable parts.
Changes for 1.6.18
- Fixed CommandHandler.scrollToPart exception when called both before and after calling CommandHandler.deleteSelection.
- Fixed rare infinite loop in LayeredDigraphLayout involving multiple links between nodes with multiple ports.
- Updated TableLayout.js extension to take the Layout.arrangementOrigin into account.
Changes for 1.6.17
- Fixed a InputEvent.clickCount values during mouseDown operations in IE10 and 11. This was already correct for mouseUp.
- Fixed an issue with Table Panel spacing when Panel.defaultRowSeparatorStroke and Panel.defaultColumnSeparatorStroke were set, and there is not enough room to display all rows/columns.
Changes for 1.6.16
- Scrollbar fixes for RTL langauges.
- TextBlock.textAlign values "start" and "end" now correctly interpret the alignment value when Diagrams divs have direction: RTL set in their CSS.
- Fix for Table Panel when panel elements had Horizontal or Vertical stretch, but not enough room. The stretch had affected sizing in the wrong direction.
- Fixed line dash drawing (Use of Shape.strokeDashArray and Shape.strokeDashOffset), a regression from 1.6.13.
- Fixed routing of links connecting with non-visible ports, a regression from 1.6.12.
Changes for 1.6.15
- Fixed some image loading scenarios when a Picture had no desiredSize set in a template, but a data-bound desiredSize.
- Stopped Shape.geometry from being scaled to zero during panel measurement.
- Fixed a null reference error when pasting a collection of Nodes and orthogonal JumpOver/JumpGap Links where some of the Links were needed to be deleted because they did not have connections on both ends.
- Fixed an issue where location bindings could potentially have side effects leading to improperly-measured Parts.
- Disallowed animations from starting when there is nothing to animate.
Changes for 1.6.14
- Improved the time when a Diagram receives focus, fixing the change made in 1.6.13, so that the ToolManager gives the focus to the diagram just before starting an eligible Tool, rather than just after it. This allows tools and event handlers to give focus to other HTML elements, while still not having the diagram get focus on the mouse down event of a click.
- Browser mousemove events over the Diagram now bubble appropriately.
- If a Tooltip or Context Menu Adornment has a Placeholder, the placeholder's scale now changes with the Diagram.scale.
Changes for 1.6.13
- Renamed the TypeScript definition file from
release/goJS.d.ts
torelease/go.d.ts
. - Auto panels with a GraphObject.desiredSize set now account for Shape.strokeWidth if their main object is a Shape.
- Fixed mouseUp erroneously blocking bubbling.
- Fixed some touchMove events erroneously bubbling, causing the page to pan while. This behavior began in 1.6.5.
- Improved how often Adornments get updated. They are now removed if the Adornment.adornedObject is removed from the Part. They are now updated during the operation of DraggingTool and other Tools.
- Changed when Diagrams receive browser focus. Diagram DOM elements are now focused on mouseUp/touchEnd, or when a tool starts. Previously it was on mouseDown/touchStart. This is to ensure clicks and touches occur at the appropriate location before the browser scrolls to focus Diagram elements when the Diagram receives focus.
- Fixed spurious caution about inability to route the LinkingBaseTool.temporaryLink the first time the user tries to draw a new link.
Changes for 1.6.12
- Fixed Binding.ofObject to evaluate more frequently when the source property is the empty string. Remember that Bindings with a source property that is an empty string should only used when necessary, because they get evaluated whenever any settable property on the source object is modified, which may include many times when the conversion function returns the same value.
- Fixed some links incorrectly invalidating at the end of an animation.
- Corrected some cosmetic animations that were leaving state collapsed when repeated animations were successively called.
- Reduced NaN errors when trying to route a Link connecting with a port element that is not GraphObject.visible.
- Overviews will now respect custom pixel ratios.
- Fixed Picture alignment when Picture.imageStretch is set.
Changes for 1.6.11
- Improved loading for Pattern Brushes.
- Diagram.makeSvg now handles Pattern Brushes.
- Fixed a bug introduced in 1.6.5 where some Key presses unintentionally bubbled.
- Fixed an issue with setting location not always updating the diagram.
- Improved event handling on devices that use Pointer events (e.g., Microsoft Surface)
- Added the OrthogonalLinkReshapingTool extension. See OrthogonalLinkReshapingTool.js for the extension's code. This extension can be used to allow for dragging of an entire orthogonal link segment, allowing for quick reshaping without needing to drag points.
- Improved orientation of Link Adornments along segments where both endpoints have the same location.
Changes for 1.6.10
- Fixed an SVG rendering bug that was introduced in 1.6.8.
- Shape.geometryString setter no longer offsets the position, instead it sets it, always overwriting the old position.
- Extended Tool.standardMouseClick to return a boolean, true if InputEvent.handled had been set to true by an event handler.
- Fixed ContextMenuTool not to show a context menu Adornment if a GraphObject.contextClick or Diagram.contextClick event handler set InputEvent.handled to true.
- Fixed mouse move events on IE9.
- Fixed an infrequent scrolling issue sometimes seen at the edges of a Diagram.
Changes for 1.6.9
- Fixes and improvements to samples.
Changes for 1.6.8
- Fixed how Diagram.findNodesByExample and Diagram.findLinksByExample compared Arrays
- Fixed link routing in some cases where there was a TwoWay Binding on Link.points with non-trivial conversions.
- Improved link routing when Link.adjusting is Link.Scale after the route is computed to be less than one unit long.
- Fixed unintended modification of model data involving TwoWay Bindings upon an undo after calling or causing Diagram.rebuildParts.
- Fixed rare cases of wrong link routes after undo of a drag.
Changes for 1.6.7
- Extended the ContextMenuTool to work on a right-mouse-down event if the tool is in the ToolManager.mouseDownTools list.
- Changed how the main Shapes of Links are measured to be more accurate. This may cause Links to have different position and location values than before.
- Fixed a collapse animation bug when rolling back transactions.
Changes for 1.6.6
- Fixed a bug with text measurement when using TextBlock.OverflowEllipsis.
- Fixed a bug with Link geometry construction when switching templates.
- Groups no longer try to update their own bounds when containing links are modified, so long as Group.computesBoundsIncludingLinks is set to false.
Changes for 1.6.5
- Fixed updating of a link geometry when modifying Link.curve or Link.curviness.
- MouseMove events now bubble by default, unless a tool other than the ToolManager is the Diagram.currentTool.
- Fixed the invalidation of custom geometries of Shapes.
- Reduced the shifting of Groups that have a LayeredDigraphLayout as the Group.layout upon repeated collapse/expand.
Changes for 1.6.4
- Wheel scrolling now respects Diagram.allowHorizontalScroll and Diagram.allowVerticalScroll in all code paths.
Changes for 1.6.3
- Fixed an exception in CommandHandler.showContextMenu when passed an argument.
- Fixed adornment invalidation when a Part switches from a visible layer to an invisible one.
- Smoothed Diagram.scale animations.
- On Mac Trackpads, users can now scroll horizontally as well as vertically.
- Improved some samples.
Changes for 1.6.2
- Added the Data Inspector sample, a simple drop-in for inspecting and editing Part data.
- Fixed some cases of testing for points being within quadratic bezier curve geometries.
- The ContextMenuTool now supports tooltips for all objects in a context menu Adornment.
Changes for 1.6.1
- Fixed an exception in
go-debug.js
involving a name conflict caused by minification.
Changes for 1.6 since 1.5.*
GoJS version 1.6 brings several new features and samples. Here are some highlights:
- Z-ordering within Layers by setting or binding the new Part.zOrder property.
- Animations for tree and Group collapse, and animation of Diagram.position with CommandHandler.scrollToPart.
- Links can now have automatically determined keys if you set the GraphLinksModel.linkKeyProperty.
- You can now send and receive incremental changes to a database instead of sending the whole model, with Model.toIncrementalJson and Model.applyIncrementalJson.
- Tooltips are now shown on touch devices when the user clicks on an object with a GraphObject.toolTip or in the diagram background when Diagram.toolTip is an Adornment.
The complete list of changes:
- Samples and documentation:
- Changed the CheckBoxes sample to make use of the newly predefined "CheckBox" panel. Note the renaming from the old sample's "CheckBoxPanel" to the predefined "CheckBox". Another change is that "CheckBox" now respects Diagram.isReadOnly and Model.isReadOnly.
- Added the Leaflet and GoJS sample, demonstrating how to integrate GoJS Diagrams with a mapping library (LeafletJS). The sample shows nodes placed at latitude and longitude locations, depicting train stations and connections on the map.
- Added the Absolute Positioning sample, demonstrating how a diagram can be made not to scroll or pan or zoom, and to disallow dragging parts outside of a fixed area.
- Added the Adornment Buttons sample, demonstrating showing buttons when a node is selected. The buttons can invoke commands with clicks or start tools with drags.
- Added the Double Circle sample, demonstrating how to use repeated CircularLayouts to arrange any number of concentric circles of nodes.
- Added the Drag Unoccupied sample, demonstrating how to customize the Part.dragComputation property so that the user cannot drag nodes to overlap any stationary nodes.
- Added the Fault Tree sample.
- Added the Path Animation sample, demonstrating how to animate the traversal of some number of Parts along straight Links.
- Added the Radial Partition sample, demonstrating how to arrange nodes in segmented rings about a central node.
- Added the Relationships sample, demonstrating how to define custom link renderings by using Shape.pathPattern as a repeating pattern along a Shape stroke path.
- Added the State Chart Incremental sample, demonstrating how to save and replay incremental changes when ChangedEvent.isTransactionFinished rather than sending or receiving a whole Model.
- Added the System Dynamics sample, demonstrating a modal editing interface, draggable labels, and multiple node and link templates.
- Added the Tree Mapper sample, demonstrating how to show and allow the user to edit the relationships between nodes in two different trees.
- Added the Simple Curved Link Reshaping Tool sample, demonstrating a custom LinkReshapingTool having Bezier curve links be reshaped using only a single reshape handle at the middle rather than two reshape handles, one at each control point. The CurvedLinkReshapingTool is defined in the CurvedLinkReshapingTool.js file in the Extensions directory.
- Added the Dimensioning sample, demonstrating a custom Link that shows the distance between two spots on the connected nodes. The DimensioningLink class is defined in the DimensioningLink.js file in the Extensions directory.
- Added the LocalStorageCommandHandler.js file, implementing the CommandHandler's clipboard in HTML
localStorage
. - Added the Snap Link Reshaping Tool sample, demonstrating a custom LinkReshapingTool that snaps link route points to grid points. The SnapLinkReshapingTool defined in the SnapLinkReshapingTool.js file in the Extensions directory.
- Diagram and Layer:
- Added Diagram.addModelChangedListener and Diagram.removeModelChangedListener, for declaring Model ChangedEvent listeners on the Diagram. The Diagram automatically passes these listeners in calls to Model.removeChangedListener (on the old model) and Model.addChangedListener (on the new model) when the Diagram.model is replaced, which can be important to avoid retaining references to objects that should be garbage collected. A Model Changed event listener can also be established when initializing a Diagram:
$(go.Diagram, "myDiagram", { . . ., "ModelChanged": function(e) { if (e.isTransactionFinished) saveModel(); }, . . . });
The listener will be called even if the Diagram.model has been replaced. - Added "document" as a new kind of unit argument to Diagram.scroll, called by the CommandHandler when handling the
Home
andEnd
keys.
- Added Diagram.addModelChangedListener and Diagram.removeModelChangedListener, for declaring Model ChangedEvent listeners on the Diagram. The Diagram automatically passes these listeners in calls to Model.removeChangedListener (on the old model) and Model.addChangedListener (on the new model) when the Diagram.model is replaced, which can be important to avoid retaining references to objects that should be garbage collected. A Model Changed event listener can also be established when initializing a Diagram:
- Animation:
- Collapsing Groups and trees now animate. Specifically, these four commands animate: CommandHandler.collapseTree, CommandHandler.expandTree, CommandHandler.collapseSubGraph, CommandHandler.expandSubGraph.
- Scrolling will animate when using CommandHandler.scrollToPart.
- Added AnimationManager.isInitial, which determines whether an animation is performed on an initial layout.
- Parts:
- Added the Part.zOrder property, which defaults to NaN and controls the the Z-ordering position of Parts when set to a real number.
- Documented several methods that have been present in previous versions but had not been documented. These methods are now overridable to customize the routing of links:
- Link.computePoints
- Link.computeOtherPoint
- Link.computeEndSegmentLength
- Link.computeSpot
- Link.computeCurve
- Link.hasCurviness
- Link.computeCurviness
- Link.computeSpacing
- Link.computeThickness
- Link.makeGeometry
- Link.invalidateRoute, to cause link routes to be recomputed via a call to Link.updateRoute
- Link.updateRoute, to call Link.computePoints if the link route is invalid
- Part.ensureBounds, to measure and arrange the part's visual tree and make sure that the width and height are real numbers
- Minor change: Multiple links between the same pair of ports now route with a bit more space between them, and possibly in a different order than before. The routing now accounts for a mid-label object, if present, to reduce their overlap. Setting or binding the Link.curviness to a real number results in routes that are unaffected by this change or by other links.
- Extended the functionality of the Node.linkConnected event handler to support access to a new Link's data.
- Extended GraphObject.alignmentFocus to permit the value of Spot.None when the object is a Node. This may be set on link label nodes to indicate to the node's Node.labeledLink that it should use the node's Node.location as the alignment point in the node instead of the normal GraphObject.alignmentFocus.
- GraphObjects and Geometry:
- Added GraphObject.shadowVisible to control on a per-GraphObject basis whether or not a shadow will be drawn.
- Added the "CheckBox" and "CheckBoxButton" predefined Panels. The "CheckBox" panel is composed of a "CheckBoxButton" and whatever you want to use as a label. The definitions are shown in the Buttons.js file in the Extensions directory. Various configurations of CheckBoxes are shown in the CheckBoxes sample.
- Added the Panel.findItemPanelForData method, to efficiently find the Panel created for an Object in the Panel.itemArray.
- Fixed the predefined "PanelExpanderButton" to respect the Diagram.isReadOnly property.
- Models:
- Added optional support for automatically maintaining unique identifiers on link data. Added the GraphLinksModel.linkKeyProperty property, which defaults to the empty string, meaning do NOT assign unique ids to links, which is compatible with previous non-behavior.
- Added the following methods: GraphLinksModel.getKeyForLinkData, GraphLinksModel.setKeyForLinkData, GraphLinksModel.findLinkDataForKey, GraphLinksModel.makeLinkDataKeyUnique. Added the GraphLinksModel.makeUniqueLinkKeyFunction property, for customizing the assignment of unique identifiers.
- Added Model.toIncrementalJson and Model.applyIncrementalJson methods, to make it easier to send incremental changes to a database instead of sending a whole model. Their use for a GraphLinksModel requires the assignment of unique identifiers to link data, so you will need to set GraphLinksModel.linkKeyProperty to the name of a link data property.
- Added the Model.copy method, which makes an empty copy of a model. Model properties are copied but data and Change listeners are not copied. Also added the Model.cloneProtected overridable method so that properties that are added to custom models can be automatically copied.
- Model.copyNodeData and GraphLinksModel.copyLinkData now copy property values that are of type Point, Size, Rect, Margin, or Spot. If you had supplied a custom Model.copyNodeDataFunction or GraphLinksModel.copyLinkDataFunction, its behavior is unaffected.
- Models now read and write property values that are predefined enumerated values, such as Link.Orthogonal or TextBlock.WrapDesiredSize. The Binding conversion functions Binding.parseEnum and Binding.toString are no longer necessary for converting EnumValues to and from strings, but they are still suggested in order to reduce the size of the corresponding JSON-formatted text renderings, just as using Point.parse and Point.stringify are suggested for binding conversions of Point values when you expect to use Model.toJson and Model.fromJson.
- Layouts:
- Added the overridable method Layout.cloneProtected, to support the automatic copying of properties that are added in custom Layout classes.
- When there are multiple roots, TreeLayout now arranges the trees respecting TreeLayout.sorting and TreeLayout.comparer.
- Improved LayeredDigraphLayout to better support routing of links from/to the sides of nodes. Just set LayeredDigraphLayout.setsPortSpots to false and set the nodes' GraphObject.fromSpot to be
Spot.RightSide
and their GraphObject.toSpot to beSpot.LeftSide
(assuming the LayeredDigraphLayout.direction is zero). If you do not want the "backwards" cycle-producing links to be routed "around" nodes, set LayeredDigraphLayout.setsPortSpots to false and set both the GraphObject.fromSpot and GraphObject.toSpot on the nodes to beSpot.TopBottomSides
(assuming the LayeredDigraphLayout.direction is 90).
- Tools and Commands:
- Added the ScrollToPart command, CommandHandler.scrollToPart and CommandHandler.canScrollToPart. This can be invoked with the Space key to scroll the diagram to show the first Part in the highlighteds or selection collection. Call it repeatedly to cycle through the collection, scrolling to each in turn. CommandHandler.scrollToPart can also be called with any Part in the Diagram in order to scroll it into view.
- Added the CommandHandler.deletesConnectedLinks property, to control whether deleting a Node automatically deletes all Links that are connected with that Node. The default value is true.
- Added ToolManager.toolTipDuration, to control how long to show a tool tip Adornment for a GraphObject or the Diagram after being motionless. Change: ToolTips now hide themselves by default after 5000 milliseconds, whereas they had remained visible forever as long as the mouse remained stationary.
- Tool Tips are now shown on touch devices when the user clicks on an object with a GraphObject.toolTip or in the diagram background when Diagram.toolTip is an Adornment.
- Fixed the DraggingTool to provide an empty Set as the DiagramEvent.subject when an external drag-and-drop is cancelled during a drop.
- Fixed DraggingTool.canStart to return false for diagrams that are Diagram.isReadOnly unless Diagram.allowDragOut is true. This prevents the tool from running within read-only diagrams, other than in Palettes and other diagrams where users will be dragging out of the diagram.
- When ContextMenuTool handles a second click that is also a context click, it may show another context menu if it is over another valid target.
- The default values of ToolManager.hoverDelay and ToolManager.holdDelay have both been reduced from 1000 to 850 milliseconds.
- Tool.standardWaitAfter now has a second, optional argument. When it exists it is the InputEvent that caused standardWaitAfter. This event is passed on to Tool.doWaitAfter. The override, ToolManager.doWaitAfter, is now what handles long taps on mobile devices and emits a simulated right-click. Long-taps simulating a right click has been part of GoJS for some time, but can now be overridden.
Changes for 1.5.23
- Fixed changing GraphObject.segmentOrientation of a Link label back to Link.None not resetting the GraphObject.angle back to zero.
- Fixed Tool.findToolHandleAt to support tool handles that are Panels, not only simple Shapes. All tool handles are elements of Adornments.
- Fixed LinkReshapingTool not to cause an exception if for some reason it is unable to Tool.findToolHandleAt the new handle created by dragging a resegmenting tool handle.
- DOM Input Events to the TextEditingTool's default tool now check if the TextEditingTool is still running.
Changes for 1.5.22
- Fixed a zoom bug introduced in 1.5.21.
Changes for 1.5.21
- Fixed changing Diagram.scale causing an error for some values of Diagram.contentAlignment.
- Improved the TextEditingTool to scroll the edited TextBlock into view, not the whole Part holding the TextBlock.
- Fixed Model.setKeyForNodeData to update link data references (regression) in GraphLinksModels.
- Fixed an aspect-ratio issue when using Diagram.makeSvg with Pictures. Fixed a related issue when using Picture.sourcerect with Diagram.makeSvg.
Changes for 1.5.20
- Fixed TextBlock.OverflowEllipsis sometimes not displaying ellipses when a height was set on the TextBlock.
- Fixed routing of links with Link.adjusting being Link.Scale or Link.Stretch sometimes resulting in straight lines.
- Fixed TreeLayout not respecting Part.isLayoutPositioned set to false on Comment Nodes (Nodes with the category "Comment").
- Text rendering improvements.
Changes for 1.5.19
- Fixed error when operating in PhantomJS environment.
- Fixed handling of control characters in text strings by Model.toJson.
Changes for 1.5.18
- Fixed Diagram.alignDocument when scrolling the current screen out of view.
- Fixed round-off errors in GridLayout positioning of nodes when GridLayout.alignment is GridLayout.Location.
Changes for 1.5.16 and 1.5.17
- In CommonJS environments, set
module.exports
as well aswindow.module.exports
, in case they are different objects.
Changes for 1.5.15
- Fixed zero-sized Arc PathSegments.
- Ensured Groups with Placeholders always recalculate their bounds when collapsed or expanded.
Changes for 1.5.14
- Fixed Picture.element property setter to allow null.
Changes for 1.5.13
- Fixed GraphObject.isActionable items being erroneously clickable through other non-actionable Parts.
- Diagram.makeSvg now uses globally unique identifiers for its elements so that SVG from makeSvg can be used multiple times in the same page.
- Fixed DraggingTool movement of a Node with a half-connected Link when DraggingTool.isGridSnapEnabled is true.
Changes for 1.5.12
- The TextEditingTool.selectsTextOnActivate now selects text on iOS Safari.
- Fixed the Part.containingGroup of reflexive member Links.
- Fixed the loading of Link routes via a Binding on Link.points when the Links were connected with a Group.
Changes for 1.5.11
- Fixes for location data binding when animation is enabled.
- Provisional fix for OSX scrollbars when invisible by default. Functionality may change in future releases.
- Fixed ResizingTool when resizing a Group with reflexive links.
- The TextEditingTool more accurately predicts the editable area for text.
Changes for 1.5.10
- Fixed the way PathSegment.Arcs are calculated and approximated. This will change computed bounds and hit-testing, which now correctly reflect drawn arcs, but the bounds changes may cause incompatibilities in apps that depend on the old approximations.
Changes for 1.5.9
- Fixed an undo/redo bug with Part.location and GraphObject.position.
- Fixed Picture optimizations to work with Picture.sourceRect
- Fixed the TextEditingTool inserting newlines into TextBlocks with TextBlock.isMultiLine set to false, when a validation function was present.
Changes for 1.5.8
- Improved the TypeScript definition file, go.d.ts, fixing some typos, changing some Object types to be any for easier usage.
- Fixed DraggingTool when DraggingTool.dragsLink is true and when dragging a Link to respect LinkingBaseTool.isValidLink on the RelinkingTool.
- Fixed TextBlock rendering in some ellipses cases.
Changes for 1.5.7
- Added an Introduction page just for Changed Events.
- Fixed Iterator.next to continue returning false once it has already returned false.
- Overviews now respect Layer.opacity
- Successive calls to CommandHandler.editTextBlock now correctly switch the TextBlock.
Changes for 1.5.6
- Changed default behavior of LayoutNetwork.commitLayout to call LayoutVertex.commit on each vertex in the layout. Previous behavior was to do nothing, but all predefined layouts that used LayoutNetwork already had overrides of this method. The new behavior is convenient for the implementation of simple custom Layouts that use networks. The new behavior does not affect custom layouts that do not use networks.
- Fixed GraphObject.getDocumentAngle sometimes returning 0 when it should return 180.
- Fixed text rendering when both TextBlock.isUnderline and TextBlock.isStrikethrough are true with all values of TextBlock.textAlign.
- Fixed export of LinkReshapingTool.setReshapingBehavior and LinkReshapingTool.getReshapingBehavior.
- Fixed Model.fromJson reading solid color Brushes, when they are not just strings.
Changes for 1.5.5
- Added the CheckBoxes sample, demonstrating how to define a "check box" and how to customize them.
- Added the static method GraphObject.takeBuilderArgument, for use by GraphObject.defineBuilder functions for more easily retrieving builder arguments from the arguments passed to GraphObject.make.
- Added the definitions of the predefined arrowheads to the Arrowheads.js file in the Extensions directory. The predefined arrowheads are still predefined, so you will not need to load this file in order to have those definitions. This file provides information about how each arrowhead is defined, so that you can customize them or copy-and-adapt them.
- Fixed TextBlock.isStrikethrough to work with all values of TextBlock.textAlign.
- Adding a Part is now undoable if its layer has changed without notifying the undo manager, such as with a "layerName":"isSelected" binding.
- Fixed Geometry.scale and Geometry.rotate of PathSegments that are arcs.
Changes for 1.5.4
- Added the Realtime Drag Selecting Tool sample, with the RealtimeDragSelectingTool defined in the RealtimeDragSelectingTool.js in the Extensions directory.
- Added the Hover Buttons sample, demonstrating how an Adornment can be used to show buttons for a node when the mouse is briefly motionless over the node.
- Added the Spiral Layout sample, with the SpiralLayout defined in the SpiralLayout.js file in the Extensions directory.
- Fixed ContextMenuTool so that any click events (Tool.standardMouseClick) in the ContextMenuTool.currentContextMenuoccur on mouse-up, not mouse-down.
- Reworked Picture code so that Picture.errorfunction is now called on every Picture instance in every Diagram that references an image which has had an error.
Changes for 1.5.3
- The transaction name argument to UndoManager.commitTransaction (or Model.commitTransaction or Diagram.commitTransaction) is now optional, and defaults to the name given at the time of the call to UndoManager.startTransaction.
- The Backspace (Windows) or Delete (Mac) key now invokes CommandHandler.deleteSelection just like the Delete (Windows) or Delete-Forward (Mac) key already does.
Changes for 1.5.2
- Updated the TypeScript definition file, go.d.ts, to TypeScript version 1.4.
- Fixed Brush constructor in Debug mode improperly raising error about string argument not being a valid color string.
- Fixed a cross-origin error when using Diagram.makeImageData with SVG images in Internet Explorer.
Changes for 1.5.1
- Added the Kanban Board sample, derived from the Swim Lanes (vertical) sample.
- Fixed scrollbar clicking on touch-enabled devices in Chrome on Windows.
- More graceful handling of Picture image errors.
- Fixed bugs with undo of changed state inside Parts whose Part.category was later changed.
- Stopped touch events from always calling preventDefault (touch events were impossible to bubble).
Changes for 1.5 since 1.4.*
- Samples and documentation:
- Added the Add or Remove Columns sample, demonstrating how columns and rows may be added to or removed from a Table Panel.
- Added the Bar Charts sample, demonstrating simple bar charts in each node.
- Added the Candlestick or Range Charts sample, demonstrating a simple candlestick chart showing ranges of values in each node.
- Added the Link Curviness sample, demonstrating how Link.curviness may be set or bound to bend links by different amounts.
- Added the Data Flow and Data Flow (Vertical) samples, demonstrating additional styles of having labeled ports on nodes.
- Added the Distances and Paths sample, demonstrating finding a shortest path between two nodes and also demonstrating finding all paths between two nodes.
- Added the Draggable Ports sample, demonstrating how one could use Nodes as ports within a Group to allow users to select, move, copy, and delete ports.
- Added the Interactive Force Directed sample, demonstrating a ForceDirectedLayout that operates continuously while the user is dragging the selection.
- Added the Magnifying Glass sample, demonstrating how to use an Overview for magnifying an area of a Diagram, with a larger Diagram.scale than the observed diagram.
- Added the Multi-Node Path Links sample, demonstrating a custom Link routing that results in a path that goes through various other nodes.
- Added the Multiple Arrowheads sample, demonstrating how a custom orthogonal Link can draw multiple arrowheads, one at the end of each segment.
- Added the Pie Charts sample, demonstrating simple pie charts in each node.
- Added the Regrouping Tree View sample, demonstrating one way of synchronizing a TreeModel in one Diagram and a GraphLinksModel in another Diagram, where both models are actually sharing the same data objects.
- Added the Sankey Diagram sample, making use of the new Node.portSpreading property and variable width links.
- Added the Scroll Modes sample, demonstrating how "Infinite Scrolling" can work and how the Diagram.positionComputation and Diagram.scaleComputation functional properties can be used.
- Added the Selectable Fields sample, demonstrating how the fields in the Records sample may be selected by the user.
- Added the Selectable Ports sample, demonstrating how ports can be selected and deleted from nodes.
- Added the Shared States sample, demonstrating one way of pretending that a node can be a member of multiple groups simultaneously. This does not make use of Groups, but makes use of custom layout and dragging to accomplish the effect.
- Added the Sparkline Graphs sample, demonstrating simple sparkline charts within nodes.
- Added the Spreadsheet sample, demonstrating many nested Table Panels forming something like a spreadsheet grid.
- Split the Swim Lanes samples into two: horizontal and vertical, Swim Lanes (vertical). Each lane (implemented by a Group) is collapsible and resizable and movable. Lanes belong to "Pool" Groups. When they are moved they are re-ordered by the custom PoolLayout within the pool. Layout within a "Lane" Group no longer happens automatically -- it only happens by calling
relayoutLanes()
. This allows the sample to remember where users have dragged the nodes, including saving and loading to JSON text. - Added the Timeline sample, demonstrating a simple graduated timeline with events positioned along it by a custom layout.
- Added the Two Diagrams sample, demonstrating how two Diagrams, each with its own Model, can share a single UndoManager, to facilitate dragging between the diagrams while supporting undo/redo.
- Added the UML Class Diagram sample, showing an implementation of UML class nodes.
- Added the Visual Tree Using Nested Groups sample, showing the visual tree of a Diagram using nested Groups rather than Nodes and Links.
- Added the Scroll Modes sample, showing new properties for controlling scrolling and zooming.
- Added the Balloon Link class in the Extensions directory. The Balloon Link is used by the updated Comments sample.
- Added the Column and Row Resizing sample, with the ColumnResizingTool and RowResizingTool defined in the ColumnResizingTool.js and RowResizingTool.js files in the Extensions directory.
- Added the Drag Creating Tool sample, with the DragCreatingTool defined in the DragCreatingTool.js in the Extensions directory.
- Added overrides of CommandHandler.copyToClipboard and CommandHandler.pasteFromClipboard to the DrawCommandHandler in the Extensions directory. Added a DrawCommandHandler.pasteOffset property to control the offset distance.
- Added the Inspector sample, demonstrating a general HTML component for showing and editing various property values. The Inspector code is defined in the Inspector.js file in the Extensions directory.
- Added the Parallel Layout sample, with the ParallelLayout, derived from TreeLayout, defined in the ParallelLayout.js file in the Extensions directory.
- Added the Scrolling Table sample, with the "ScrollingTable" Panel defined in ScrollingTable.js in the Extensions directory. That also contains the definition of the "AutoRepeatButton" Panel, two instances of which are used by each "ScrollingTable".
- Added the Table Layout sample, with the custom Layout defined in TableLayout.js in the Extensions directory.
- Added the Tree Map Layout sample, with the layout defined in TreeMapLayout.js in the Extensions directory.
- Moved the definitions of the predefined Buttons from the Introduction to the Buttons.js file in the Extensions directory. The predefined buttons are still predefined, so you will not need to load this file in order to have those definitions. This file provides information about how each button is defined, so that you can customize them or copy-and-adapt them.
- Diagram and Layer:
- Added Diagram.findNodesByExample and Diagram.findLinksByExample, two methods for finding a collection of Nodes or Links that are bound to data whose properties match the argument object's properties. This is used by the updated Org Chart (static) sample, to demonstrate search capabilities.
- Added Diagram.scrollMode property, an enum property that can be set to Diagram.DocumentScroll (the default) or Diagram.InfiniteScroll, to allow for endless scrolling in all directions. This is demonstrated by the new Scroll Modes sample.
- Added Diagram.scrollMargin property, allowing the declaration of additional scrollable area around the Diagram.documentBounds.
- Added Diagram.positionComputation property, a function that determines the Diagram.position that a Diagram can be scrolled or moved to.
- Added Diagram.scaleComputation property, a function that determines the Diagram.scale that a Diagram can be zoomed to.
- Added Diagram.updateAllRelationshipsFromData, to update the relationships between nodes in the diagram when there have been changes to properties in the model data that hold node references (keys) without having gone through model methods. Like Diagram.updateAllTargetBindings, this is only needed for environments where one cannot control changes to model data.
- Added Diagram.setProperties, to set a bunch of properties in exactly the same manner that GraphObject.make does when constructing a Diagram.
- Removed support for ancient versions of Firefox (3.6), Opera (10, 11), and Safari (5.0).
- Parts:
- Potentially Incompatible: Fixed a Link to be a member of a Group if it connects a member node of the group with the group itself. Such links now connect with the group from inside rather than from the outside. GoJS had been inconsistent with such membership and its implications. The behavior is demonstrated by the Navigation sample.
- Extended the Link.points property setter to accept not only a List of Points and an Array of an even number of numbers, but also an Array of Objects each of which has 'x' and 'y' properties that are numbers.
- Added Node.findTreeLevel method, to determine a Node's depth in a tree. Root nodes (i.e. no Node.findTreeParentLink) have a level of zero.
- Added Node.findCommonTreeParent method, to find a Node that is the closest ancestor to two Nodes, which may include either of the two Nodes themselves.
- Added Node.portSpreading property, to control how link points are computed when "Side" spots are specified. See the Sankey Diagram sample for an example using Node.SpreadingPacked instead of the default value of Node.SpreadingEvenly. Use Node.SpreadingNone with a multiple "Side" spot, such as Spot.LeftRightSides, in order to have the connection point always be at the middle of either the left side or the right side, whichever is closer.
- Added Group.handlesDragDropForMembers property, which avoids having to define GraphObject.mouseDragEnter, GraphObject.mouseDragEnter, or GraphObject.mouseDrop event handlers on each Node or Link that is a member of a Group in order to delegate the drag-and-drop events to the containing Group. For compatibility the default value is false. Adding this property has significantly simplified several samples: Planogram, Regrouping, and Swim Lanes.
- Added Part.findSubGraphLevel method, to determine a Part's nested depth in the hierarchy of containing Groups. A Part that is Part.isTopLevel has a level of zero. See the Regrouping Scaled sample for an example usage.
- Added Part.updateRelationshipsFromData method, to update the relationships between nodes in the diagram when there have been changes to properties in the model data that hold node references (keys) without having gone through model methods. Like Part.updateTargetBindings, this is only needed for environments where one cannot control changes to model data.
- GraphObjects and Geometry:
- Changed the default value of Shape.parameter1 and Shape.parameter2 from 0 to NaN. This allows the use of zero as a legimate value for the range of numbers handled by any particular figure. However, since Shape.defineFigureGenerator is new for version 1.5, this change is unlikely to be an issue for any existing code.
- The predefined Buttons are styled differently, to be flatter and more rectangular. You can customize them by setting their properties and their nested properties. See their new definitions in the Buttons.js file in the Extensions directory.
- Added the "PanelExpanderButton" predefined Panel, used by the IVR Tree and Entity Relationship samples. The definition is shown in the Buttons.js file in the Extensions directory.
- Added GraphObject.setProperties, to set a bunch of properties in exactly the same manner that GraphObject.make does when constructing a GraphObject.
- Added GraphObject.defineBuilder static function for defining new names that can be used by GraphObject.make. This is used in the Scrolling Table sample for the "AutoRepeatButton" and the "ScrollingTable".
- Added Shape.defineFigureGenerator static function for defining new figure names for Shape.figure.
- Added Shape.getFigureGenerators static function for getting a Map of figure names. This is used in the Shapes sample.
- Added Geometry.defaultStretch property, which can be used by figure generators to control the aspect ratio of the Shape that uses that figure.
- Added Geometry.add and PathFigure.add methods, to make it easier to construct Path Geometries in code, which is much more efficient than using GraphObject.make.
- Added "BarH" and "BarV" figures, used by Grid Panels to fill rectangular areas rather than just draw horizontal or vertical lines. See Grid Patterns for example usage.
- Added Shape.defineArrowheadGeometry static function for defining new arrowhead names for Shape.toArrow and Shape.fromArrow.
- Added Shape.getArrowheadGeometries static function for getting a Map of arrowhead names. This is used in the Arrowheads sample.
- Added Picture.sourceCrossOrigin property, for customizing cross-origin image requests.
- Added TextBlock.maxLines, to limit the number of lines of text shown in a TextBlock.
- The TextBlock.font property setter now raises an error in
Debug
mode if the new value is not a valid font. - Added Panel.findMainElement method, to get the first child element with GraphObject.isPanelMain true, or if there is no such element, just the first element.
- Extended support for a first Panel element that is kept when Panel.itemArray gets a new Array value, beyond just Spot and Auto and Link Panels, to Table Panels whose first element is a "TableRow" or "TableColumn" Panel with Panel.isMainPanel true. This makes implementing literal table headers possible without having the header information in the item Array as the first item. This is now demonstrated in Item Arrays, as well as the previously supported case where the header information was in the item array, Template Maps.
- In templates, Auto or Spot Panels with zero or only one element in them will result in a warning message. Their operation with zero or one element is otherwise unchanged. However, Auto and Spot Panels expect there to be a "main" element, so having this warning may help detect places where editing mistakes may have resulted in unexpected visual trees.
- Fixed removing the wrong element in a Spot or Auto Panel that had a Panel.itemArray when calling Model.removeArrayItem.
- Models:
- Added Model.copiesArrays and Model.copiesArrayObjects properties, so that often one does not need to implement a custom Model.copyNodeDataFunction. The samples have been simplified by using these two properties and removing all of the functions that were used to copy node data without sharing Arrays or array item objects.
- Improved data binding target resolution when there are duplicate object names.
- Layouts:
- Added an optional predicate argument to LayoutNetwork.addParts, for easier filtering of which nodes or links to include in the network as vertexes or edges.
- Added ForceDirectedLayout.randomNumberGenerator, which can be set to null each time you want to use and reset its own internal random number generator instead of calling Math.random(). This is useful for repeatable results given identical initial circumstances.
- Fixed bug in LayeredDigraphLayout when dealing with nodes of multiple ports that had not yet gotten real positions.
- Tools and Commands:
- Added LinkingBaseTool.isValidCycle, exposing a predicate called by LinkingBaseTool.isValidLink to check the validity of a proposed link according to the value of Diagram.validCycle.
- Added CommandHandler.copiesConnectedLinks property, to allow control whether Links connected with selected Nodes are copied by CommandHandler.copySelection, much as DraggingTool.copiesEffectiveCollection does for the DraggingTool.
- Improved external drag-and-drop between Diagrams to give focus to the target diagram upon a successful drop.
- Improved ToolManager.positionToolTip and ContextMenuTool.positionContextMenu to allow Adornments (tooltips and context menus) to position themselves when they contain a Placeholder.
- Collections:
Changes for 1.4.28
- Fixed calculation of "Side" port positions when there are multiple ports on a node.
- More permissive Picture drawing: Will still draw if an image has an error but is complete at a later time (such as from a timeout).
Changes for 1.4.27
- Fixed TextBlock ellipses when using the undocumented property TextBlock.maxLines
Changes for 1.4.26
- Fixed some clipping scenarios with Diagram.makeSvg.
- Improved shadow rendering in Diagram.makeSvg.
- Diagram.makeSvg now includes temporary parts in its bounds computation when
showTemporary
is set to true.
Changes for 1.4.25
- Dragging into a new Diagram now initializes it.
- Moving collapsed members of Groups now modifies position or location, depending on which is real.
- Fixed ResizingTool, which could make assumptions expecting a non-null Shape.geometry.
Changes for 1.4.24
- Fixed routes of dragged Links after temporarily copying when the UndoManager.isEnabled.
- Fixed DraggingTool to disallow drag-and-drop from another Diagram whose Model.dataFormat is different than its own.
- Reverting a change from 1.4.14 and 1.4.20, setting Picture.source no longer sets the
crossOrigin
flag on generated images. This functionality can be customized with the undocumented property Picture.sourceCrossOrigin, a settable function that returns a new value for theimage.crossOrigin
. This property will be documented in 1.5.
Changes for 1.4.23
- Part.updateAdornments now calls Panel.updateTargetBindings on each Adornment.
- Changing the category of Groups no longer collapses sub-groups.
- Minimum width and height now correctly account for margins.
- Improved sizing of the TextEditingTool's text editor.
- Improved routing of adjusted routes between Spot.None ports.
Changes for 1.4.22
- Fixed a position initialization bug when GraphObject.position is data-bound and Part.locationSpot is not Spot.TopLeft.
- Updated the "Inductor" Shape.figure.
- Stopped the keyboard's Menu key from erroneously emitting an additional event.
- Shape.strokeDashArray once again accepts zeroes as dash values, but does not accept an array of nothing but zeroes.
- Fixed GraphObject.toMaxLinks and GraphObject.fromMaxLinks property setters to allow Infinity (which is the default value).
Changes for 1.4.21
- Fixed measuring Table Panels that contained only TableRow and TableColumns.
- Free up DOM elements by setting Diagram.div to null.
Changes for 1.4.20
- Dynamically adding a RowColumnDefinition now updates its containing Panel.
- RowColumnDefinition width and height now correctly undo/redo.
- Fixed some Link routes when ungrouping collapsed Groups.
- Panel.Viewbox will no longer attempt to set a GraphObject's scale to zero.
- Setting Picture.source now conditionally sets the crossOrigin flag on the generated image. It is set to "anonymous" unless it is served from a data URI or the local filesystem (it will keep the default null value).
- Fixed TextBlock.maxLines not always working in some wrapping scenarios.
- Fixed routing of some Links when copied by DraggingTool.
- Fixed Link visibility issues when undoing tree collapsing and expanding.
- Fixed expand/collapse issues when two data-bound diagrams share a model.
- Group adornments are now correctly updated when collapsing trees.
- Fixed CommandHandler.ungroupSelection to expand the Group before removing its members and discarding the group, and to select any links in addition to the nodes.
Changes for 1.4.19
- Improved panning performance on high-density displays.
- Fixed a bug introduced in 1.4.17 groups were unable to resize after parts were dragged out.
- Fixes to auto scrolling.
Changes for 1.4.18
- Fixed some jumpover Links not recalculating their routes at the right time.
- Diagram.makeImage "parts" option no longer conflicts with "position" option.
Changes for 1.4.17
- Fixed initialization bug with Diagram.findObject... methods not working right after the inital layout completion.
- DraggingTool now ignores invisible parts when computing bounds of dragged Parts.
- Shape.strokeDashArray no longer accepts zeroes as dash values.
- Fixed expanding moved Groups not to route Links at original locations.
- Fixed DraggingTool not allowing Nodes to drag out of groups when grid snapping is enabled.
Changes for 1.4.16
- Calculations for Diagram.zoomPoint values fixed when scroll and keyboard-command zooming.
- Fixed Picture copying, and Picture now reports draw errors in go-debug.
- Updated BPMN extension templates.
Changes for 1.4.15
- Diagram.makeImage and Diagram.makeSvg now stop animation before executing.
- Text rendering fixed when combining newlines (\n) with wrapped text.
- TreeLayout no longer causes an iteration exception when the TreeLayout.roots collection contains vertexes that are in the same tree.
Changes for 1.4.14
- Text will always draw fully (instead of just a line at very small scales) when calling Diagram.makeImage.
- Setting Picture.source will now set the crossOrigin property of the created image to "anonymous" by default.
Changes for 1.4.13
Changes for 1.4.12
- Fixed AvoidsNodes routing of member Links during Group initialization.
- Fixed Link route invalidation of duplicate links when loading model with Link.points data bound.
- Fixed Link routing when the port is a TableRow or TableColumn, or element inside one.
- Fixed incorrect error message when setting Diagram.minScale or Diagram.maxScale to their current values.
Changes for 1.4.11
- Tweaked how shadows work for Parts that use Spot panels.
- Fixed line height calculations broken in 1.4.10. This was causing the TextEditingTool's textArea to grow too large.
- Fixed drawing issues arising from non-visible objects with a GraphObject.opacity set.
Changes for 1.4.10
- Fixed link calculation when connecting to TableRows and TableColumns, and their immediate elements.
- Fixed dragging coordinates for Diagrams with pixel ratios other than 1.0.
- Fixed value for Diagram.isModified after undoing an insertion or removal after setting isModified to false.
- Fixed some objects not drawing during animation when initially out of view.
- Fixed TreeLayout.layoutComments to handle comment Nodes that are Groups.
Changes for 1.4.9
- Added Introduction page for Legends and Titles.
- Fixed LayoutNetwork.addParts to treat links between nodes nested more than one Group deep as if they were connecting the outer Groups.
- Fixed case where making some changes, setting Diagram.isModified to false, undoing, and then making a new change (thereby discarding some Transaction history), resulted in isModified becoming false when it should have remained true.
- Fixed the invalidation of Layout when adding or removing a Link even though the link's Part.layoutConditions did not include Part.LayoutAdded or Part.LayoutRemoved.
- No longer give warnings when a Picture.source fails to load.
- Fixed some sizing issues in IE9 when CSS box-sizing is applied to all HTML elements.
Changes for 1.4.8
- Improved completely disconnected Link geometry not to assume that it must be Bezier curved.
- Fixed a regression from 1.4.7 with link visibility when connected to Nodes in collapsed Groups.
- Fixed some starting transactions animating improperly.
- Fixed DraggingTool to use the Option key (Alt) modifier on a Mac to indicate a copying operation, rather than the Control key.
Changes for 1.4.7
- Added the Port Shifting sample, with the tool defined in PortShiftingTool.js, demonstrating how a custom Tool can allow the user to move a port within a node.
- Added a "semantic zoom" slider to the Regrouping sample, for controlling how many nested levels of Groups are expanded.
- Fixed some animation bugs on iOS/OSX Safari.
- Potentially Incompatible: Collapsed Groups no longer update their member's positions. They are only updated when they are visible again (when the group is expanded).
Changes for 1.4.6
- New property DraggingTool.isComplexRoutingRealtime allows the disabling of Link.AvoidsNodes during dragging operations.
- Diagram.rebuildParts now allows animation.
- Improved animation by removing a race condition.
- Reworked link label position. This fixes bugs but may cause some link labels to have new positions, especially when GraphObject.segmentOffset values were NaN.
Changes for 1.4.5
- Added the Fishbone Layout sample, with the layout defined in FishboneLayout.js, demonstrating how a custom Layout and a custom routed Link can produce a fishbone or Ishikawa or cause-and-effect diagram.
- GoJS now accounts for window.devicePixelRatio.
Changes for 1.4.4
- New option for Diagram.makeSvg: elementFinished, a function allowing you to modify the SVG as it is being built.
- TextBlock ellipsis now works correctly with wrapped text.
- All GraphObjects now allow opacity: Panel.opacity has been moved to GraphObject.opacity.
- SVG generated with Diagram.makeSvg now contains the
xmlns
andxmlns:xlink
attributes.
Changes for 1.4.3
- Animations no longer continuously update the Diagram.documentBounds.
- Fixed window resizing accidentally invalidating (viewport-sized) layouts on fixed-size diagrams.
- Diagram.makeSvg now includes a clipping region to fix IE's SVG behavior, which does not clip to its SVG viewport by default.
- New option for Diagram.makeImage and Diagram.makeSvg: document, which accepts an optional HTML Document in lieu of window.document. This can be useful when opening generated SVG or Images in a new window.
Changes for 1.4.2
- Reworked transactions for the TextEditingTool. Transactions no longer start when the tool activates, instead they begin and end when the tool commits accepted text.
- Fixed Firefox's zoom shortcuts, CTRL-plus and CTRL-minus were not properly captured.
Changes for 1.4.1
- Fixed visibility of Links when changing Layer.visible of connected Nodes.
- Fixed DraggingTool to allow moving of copied parts even though Diagram.allowMove is false.
- Improved dragging from Palette to show temporary copy of dragged parts within the Palette.
- Miscellaneous performance improvements.
Changes for 1.4 since 1.3.*
- Animation:
- GoJS layouts now animate by default. This can be controlled with a Diagram's AnimationManager class.
- Samples and documentation:
- Added the Layer Bands sample, where the layout overrides the TreeLayout.commitLayers method in order to make sure the special "_BANDS" Part's items are updated to show a "band" object around each tree layer.
- Added the Link Label Dragging sample, with the tool defined in LinkLabelDraggingTool.js, demonstrating how the user can manually adjust the position of link labels.
- Added the Node Label Dragging sample, with the tool defined in NodeLabelDraggingTool.js, demonstrating how the user can manually adjust the position of node labels that are in "Spot" Panels.
- Added the Link Shifting sample, with the tool defined in LinkShiftingTool.js, demonstrating how the user can manually shift the end of a link to connect anywhere along the sides of a node.
- Improved the Friend Wheel sample to make use of Part.isHighlighted.
- Changed the documentation style.
- Diagram and Layer:
- Added the AnimationManager class and the Diagram.animationManager property.
- Added Diagram.highlighteds collection and Diagram.highlight, Diagram.highlightCollection, and Diagram.clearHighlighteds methods.
- Diagram.selectCollection now accepts an Array of Parts as well as an Iterable of Parts.
- When dragging out from a Palette, the cursor initially shows the "no-drop" cursor until it is over a diagram with Diagram.allowDrop true.
- Parts:
- Added the Part.isAnimated property (default is true).
- Added Part.isHighlighted property, a standard way of declaring that a Part is highlighted. Use data binding to change the appearance of your parts, e.g.:
new go.Binding("stroke", "isHighlighted", function (h) { return h ? "red" : "black"; }).ofObject()
- Added Group.findExternalLinksConnected and Group.findExternalNodesConnected methods, to find connections from anywhere inside a Group (including inside nested Groups) to anywhere outside of that Group.
- Fixed changing layers of Nodes and Links not to call Group.memberAdded, Group.memberRemoved, Node.linkConnected, or Node.linkDisconnected event handlers.
- Fixed routing of Bezier Links when Link.adjusting is not None.
- Fixed a case of undoing the deletion of a port on a Node causing connected Links to be connecting with the whole node instead of the particular port element.
- Fixed the spreading of side Link connection points on a Group when some of the links are actually connected with non-visible member Nodes because the Group is collapsed.
- GraphObjects and Geometry:
- Added TextBlock.overflow property and TextBlock.OverflowEllipsis and TextBlock.OverflowClip enum values; clipping is the default behavior when there is not enough room to draw all of the text.
- Added Panel.itemIndex, set automatically for Panels created to represent itemArray items and useful in data bindings within item templates.
- Invalid color strings now result in errors when using
"go-debug.js"
, making it easier to track down painting problems.
- Models:
- Undo and redo operations now raise "ChangingSelection" and "ChangedSelection" DiagramEvents, to handle cases where the undo or redo deleted selected Parts.
- Fixed updating of Bindings to the empty string property name when a specific data property was changed.
- Layouts:
- Added TreeLayout.layerStyle property; when set to the new enum value TreeLayout.LayerUniform, all nodes at the same layer level will be aligned. The default value, TreeLayout.LayerIndividual, produces the original behavior where each node only takes up as much depth as it needs, causing its children not necessarily to be aligned with its siblings' children.
- Added TreeLayout.commitLayers and LayeredDigraphLayout.commitLayers overridable methods, for getting information about the size and position of the "bands" (layout layers) cutting across the diagram, which is useful when positioning labels or putting rectangular areas behind each band.
- Fixed LayoutVertex.focus to be at the center of the Part.locationObject.
- Fixed GridLayout's wrapping being influenced by the setting of Layout.arrangementOrigin.
- Tools and Commands:
- Removed ZoomIn and ZoomOut commands from the default touch context menu.
- Added DraggingTool.isCopyEnabled, to allow disabling of copying by control-drag-drop without disabling copying altogether.
- Added ContextMenuTool.currentObject, to make it easier to refer to the GraphObject for which the context menu is being shown.
- Fixed some versions of Android Browser causing two click events for a single tap.
- New Gesture: Zooming with MSGesture events is now supported on Microsoft touch devices.
- Collections:
- Added Iterator.any, List.any, Set.any, and Map.any methods that take a predicate function as an argument and return true if the predicate is true for at least one item in the collection.
- Added Iterator.all, List.all, Set.all, and Map.all methods that take a predicate function as an argument and return false if the predicate is false for at least one item in the collection.
- Added Iterator.each, List.each, Set.each, and Map.each methods that take a function as an argument and call it on each item in the collection.
- Added Map.first method, returning a key/value pair object, or null if the Map is empty.
- Fixed
aMap.iterator.first()
to return a key/value pair object, not the first key. - Added Map.iteratorValues property, for iterating over the values in the Map. Added Map.iteratorKeys property, for iterating over the keys of the Map. (Map.iterator continues to return an Iterator for iterating over the keys and values of the Map. This is the same as Map.iteratorValues unless one calls
first
,any
,all
, oreach
on the Iterator.)
Changes for 1.3.11
- Improved re-routing of Links to deeply nested subgraph Nodes upon expanding a subgraph.
- Fixed potential error in GridLayout when switching template for an existing Group.
- Brush copies now correctly copy start and end Spot values
Changes for 1.3.10
- Fixed some bounds calculations of elements inside of TableRow and TableColumn Panels.
- Fixed the "Modified" DiagramEvent when the UndoManager is not enabled.
- Improved AvoidsNodes routing of Links when there are Nodes that are not visible.
- Fixed Diagram background grid issues when an Overview was only partially initialized.
Changes for 1.3.9
- The TextEditingTool now checks Diagram.allowTextEdit (previously, only CommandHandler.canEditTextBlock did).
- Changing a drag from a move to a copy (with the control key) now correctly saves any link routes so that an undo/redo does not restore the routes to where the node had been moved to before being copied.
- Panels with no elements now properly respect all combinations of desiredSize, minSize, maxSize, and padding.
- Allowed SVG to work with Picture elements on browsers that support drawing SVG to canvas. See the Pictures intro page for details.
- Fixed internal line-intersection for TableRow and TableColumn Panels.
Changes for 1.3.8
- Fixed the measurement of some GraphObjects when modifying angle with both a desiredSize and minSize set.
- Fixed Diagram.addLayerAfter and Diagram.addLayerBefore for re-ordering layers, and improved their error checking.
Changes for 1.3.7
- Fixed Set.toList.
- Fixed the Diagram.model property setter to call Diagram.clearSelection before actually replacing the model.
- Fixed Picture measuring scenarios where it would incorrectly prefer a stretch value over the desiredSize when both were given.
- The Link.points setter now also accepts an Array of numbers representing point values ([x1, y1, x2, y2, x3, y3], etc.)
Changes for 1.3.6
- Added Seating Chart sample.
- Fixed a bug in calculating positions of member nodes when dragging a group.
- The "TreeExpanderButton" and "SubGraphExpanderButton" Panels are now calling CommandHandler.canCollapseTree, CommandHandler.canExpandTree, CommandHandler.canCollapseSubGraph, or CommandHandler.canExpandSubGraph, as appropriate, in case any of those methods were overridden.
- Tool.standardMouseWheel now calls CommandHandler.canIncreaseZoom or CommandHandler.canDecreaseZoom, as appropriate, in case either method is overridden.
Changes for 1.3.5
- Added Model.addNodeDataCollection, Model.removeNodeDataCollection, GraphLinksModel.addLinkDataCollection, GraphLinksModel.removeLinkDataCollection, taking either Arrays or Iterables of model data objects, for convenience.
- Fixed Table Panel's measuring of GraphObjects that span multiple rows and columns in some situations.
- Fixed Node.ports to include the default port, the whole Node, when there are no objects with GraphObject.portId set to non-null.
- Fixed some method names on Spot which had not been exported.
- Fixed the scaling of some arcs in a Geometry.
Changes for 1.3.4
- Added the Robot sample in the extensions directory, demonstrating the simulation of input events.
- Added the "Ring" figure for Shapes.
- Added property setters for InputEvent properties: control, shift, alt, meta, left, middle, right, for convenience when initializing to avoid requiring knowledge of the particular flag values.
- Added Part.LayoutNodeReplaced as a new reason for invalidating Layouts, to fix a bug where a Layout would not be performed when replacing a Node or simple Part by changing its Part.category, because the new Node had a fixed size.
- Scrolling on uninitialized Diagrams will no longer capture the event and prevent bubbling.
- Fixed shadows in some Panel scenarios involving Auto panels.
- Fixed the display of never-arranged Nodes when added to an invisible Layer that is later made visible.
- Fixed data binding on the first elements of "Spot", "Auto", and "Link" Panels that hold Panel.itemArrays.
- Margin.parse now parses strings with only zero, one, or two numbers in them, as if calling the Margin constructor.
- Fixed the Diagram.grid setter, which was not always updating the grid immediately.
- Potentially Incompatible: Fixed Table Panel's allocation of cell size in some complex settings, such as with multiple rows or columns stretching. Some complex Table Panels may size differently now.
Changes for 1.3.3
- Added CommandHandler.defaultScale property, initially 1.0.
- When AMD Module
define
capability is present,go
is still exposed to the global object, which avoids problems with undefinedgo
when explicitly loading"go.js"
instead of using your framework's require mechanisms. - Reduced possible errors with zero-sized images used as Picture sources.
- Fixed default value of
scale
for Diagram.makeImage (Default should benull
, was erroneouslyNaN
). - Zero is now an allowed value in the array of Shape.strokeDashArray
Changes for 1.3.2
- Fixed exception when Diagram.makeImage generates very large images.
- Fixed Layouts maintaining custom link routing in nested groups.
- Fixed tree collapsing causing some links to not update when the tree is expanded after moving the node.
- Fixed the drawing of strokes when Shape.strokeWidth is zero.
Changes for 1.3.1
- Fixed computation of tree relationships when Link.isTreeLink is modified dynamically.
- Fixed the behavior of GraphObject.mouseDragEnter and GraphObject.mouseDragLeave and the Regrouping and Planogram samples not to depend on the target Diagram.selection for external drag-and-drops.
- Fixed bounds calculations when using the DraggingTool with Parts that were not in the default layer.
- Implemented support for comments in ForceDirectedLayout; for compatibility and efficiency ForceDirectedLayout.comments now defaults to false. Also added overridable method ForceDirectedLayout.addComments.
- Added TreeLayout.comments property, for efficiency by disabling searching for "Comment" Nodes associated with each Node; for compatibility the default value is true.
- Allowed Diagram.makeImage to accept no arguments again.
Changes for 1.3 since 1.2.*
- Samples and documentation:
- Added the Tournament sample.
- Added the Draggable Link sample, demonstrating partly or fully disconnected Links.
- Added the Require sample, demonstrating use of GoJS AMD module definition and use with RequireJS.
- Added the Angular sample, demonstrating a GoJS "goDiagram" directive in AngularJS.
- Added the BPMN Editor sample in the extensions directory, demonstrating BPMN templates and using custom tools.
- Diagram and Layer:
- Added support for (static) SVG generation with Diagram.makeSvg. You can generate an SVG scene of all or part of a Diagram using the same options that Diagram.makeImage takes.
- Added a "Modified" DiagramEvent, to support updating non-Diagram UI after the Diagram.isModified property has changed. Many samples now implement such a listener to add a "*" to the document title and to enable the "Save" Button. A "Modified" DiagramEvent listener should not modify the Diagram or its Model. Replacing the Diagram.model now automatically sets Diagram.isModified to false, but you still have to set it when you save a diagram.
- Added Diagram.copyParts method, for copying a collection of Parts and returning a Map of original Parts and their respective copies. (This is called by CommandHandler.copySelection and CommandHandler.pasteSelection and the DraggingTool.)
- Added Diagram.removeParts method, for deleting a collection of Parts. (This is called by CommandHandler.deleteSelection.)
- Added Diagram.moveParts method, for shifting the location of a collection of Parts. (This is called by the DraggingTool and CommandHandler.pasteSelection.) Moving with a zero offset will align the parts to the grid, if DraggingTool.isGridSnapEnabled is true.
- Fixed Diagram.findPartAt with a false selectable argument, to ignore temporary Layers, just as it always has when selectable is true.
- Fixed Diagram.findObjectAt (and similar methods) not correctly finding remaining TableRow or TableColumn Panels in Table Panels that have been modified.
- Fixed some cases where Layouts with
Layout.isRealtime == false
would perform their layout at incorrect times. - There is now an implicit transaction that surrounds the initial layout of a Diagram. This ensures that all model Changed listeners are called at a time when all of the diagram state has been updated.
- Diagram.hasHorizontalScrollbar and Diagram.hasVerticalScrollbar now trigger an update to remove or add the scrollbars appropriately.
- Parts:
- The default Diagram.nodeSelectionAdornmentTemplate, Diagram.groupSelectionAdornmentTemplate, Diagram.linkSelectionAdornmentTemplate, ResizingTool.handleArchetype, LinkReshapingTool.handleArchetype, LinkReshapingTool.midHandleArchetype, RelinkingTool.fromHandleArchetype, RelinkingTool.toHandleArchetype, and RotatingTool.handleArchetype now all default to showing blue handles.
- Added Node.linkValidation property, which if non-null, is called by LinkingBaseTool.isValidLink to support validating potential links at each node, in addition to the LinkingBaseTool.linkValidation on the LinkingTool and RelinkingTool.
- Added Group.computesBoundsIncludingLinks property, which if false causes the computation of a Group's members bounds to ignore Links.
- Added Group.computesBoundsIncludingLocation property, which if true causes the computation of a Group's members bounds to include its current Location. This is helpful to allow users to move member nodes at the top down or at the left side rightwards, without necessarily shrinking the Placeholder and shifting it down or towards the right.
- Fixed RotatingTool.updateAdornments not to require the rotation Adornment to use a Part.locationSpot of Spot.Center.
- Copying a Link with AvoidsNodes routing no longer invalidates the route of the original Link.
- GraphObjects and Geometry:
- Added Point.projectOntoLineSegment, Point.projectOntoLineSegmentPoint, Point.snapToGrid and Point.snapToGridPoint methods.
- Corrected some Table Panel layouts with complex sizing rules.
- Added a new arrowhead (Shape.toArrow and Shape.fromArrow), the empty string (""), which can be used to turn an arrowhead "off" without making ths Shape revert to a regular figure.
- Models:
- A regular Node may become a label node on a Link or vice-versa, dynamically. Whether a node is a link label node is determined in a GraphLinksModel by whether there is a reference to the node in the link's GraphLinksModel.getLabelKeysForLinkData Array. You can use whatever category you like to choose the node template used to represent the node data; "LinkLabel" is the default predefined category for link label nodes.
- Added Model.modelData property, a JavaScript object for programmer-defined properties that are written by Model.toJson and read by Model.fromJson. This provides easy persistence of properties that are for the whole model, not for individual nodes or links.
- A Binding target of GraphObject.name now may produce an error. A TwoWay Binding whose source is the key property on node data now may produce an error. These kinds of Bindings have always been disallowed, but now are more likely to produce an error that can be seen in the console log.
- Added ChangedEvent.isTransactionFinished property, for convenience in detecting model changes that are of type ChangedEvent.Transaction and indicate the end of a committed transaction or undo or redo.
- Fixed Model.addArrayItem and Model.insertArrayItem to accept non-Object new item values.
- Tools and Commands:
- Potentially Incompatible: Mac-based platforms now use the Command key instead of Control for almost all commands. For instance the undo command is Control-Z on Windows and Linux platforms and Command-Z on Macs. This is more canonical on Macs, but could cause incompatibilities if custom tools were created.
- New Gesture: On iOS devices, a two-finger pan now pans the page instead of the Diagram.
- Scrolling and zooming with a mouse wheel can now be used on scrolling devices and trackpads that allow for less than one "click" of a scroll wheel, accommodating finer scrolling.
- The TextEditingTool now automatically selects text upon focus.
- The TextEditingTool now demands focus until it is completed or cancelled.
- Added LinkReshapingTool.getReshapingBehavior and LinkReshapingTool.setReshapingBehavior to allow overrides of LinkReshapingTool methods access to the permitted user reshaping behaviors of particular reshape handles.
- Added RelinkingTool.copyLinkProperties method, which copies properties of the selected Link to the LinkingBaseTool.temporaryLink.
- Added LinkingBaseTool.isUnconnectedLinkValid property on LinkingTool or RelinkingTool, to control whether the user may draw new links or reconnect existing links to no port/node.
- Added DraggingTool.dragsLink property, to control whether the user may drag a single link, disconnecting it from any nodes, and perhaps reconnecting the link at one or both ends.
- Added DraggingTool.startPoint property, to improve ability to simulate drag-and-drops.
- Added CommandHandler.copiesParentKey and CommandHandler.copiesGroupKey properties, to have a copy/pasted new node automatically be a child of the original node's tree parent or a member of the original node's containing group.
- Resizing, reshaping, rotating, and relinking tool Adornments no longer appear on selected Parts that are in Palettes or other Diagrams that are Diagram.isReadOnly.
- Improved Part.updateAdornments to hide or show tool adornments on selected Parts as their Part.reshapable, Part.resizable, or Part.rotatable properties are modified dynamically.
- Only a left-button mouse-down will allow LinkReshapingTool.canStart to return true; other buttons no longer cause the LinkReshapingTool to start.
- Fixed some cases where a copy-pasted Part had a different location than the original.
Changes for 1.2.8
- Fixed some relinking bugs with undo/redo.
- Some table panel measurement fixes.
Changes for 1.2.7
- Fixed exception when changing Panel.itemArray decreased the number of items in an Adornment or Group.
- Fixed mouse cursor on Diagram (Diagram.currentCursor, Diagram.defaultCursor) erroneously setting the cursor for the entire page.
- Touch-zoom gestures now correctly respect Diagram.minScale, Diagram.maxScale, and Diagram.allowZoom on all platforms.
Changes for 1.2.6
- Fixed the setter for Shape.strokeDashArray, which incorrectly discarded null as a value.
- Fixed a divide-by-zero scenario in link routing.
- Stopped Table Panel rows and columns with only stretch elements from taking up inappropriate space.
- Other minor Table Panel fixes.
Changes for 1.2.5
- Fixed context menu clicks on touch-capable devices when a mouse-right click was performed on an object with no available context menu.
- Fixed some areaBackgrounds when they used shared brushes with objects of identical size, when those objects are rotated at different angles.
- Fixed object picking after calling Diagram.makeImage with a non-default viewport.
Changes for 1.2.4
- Fixed double-clicking in some circumstances on IE10 and IE11.
- Fixed initial performance of Group.layouts even when Layout.isInitial was false.
- Fixed some bugs with zero and near-zero sized Diagrams that caused update loops when layouts were Layout.isViewportSized.
- Fixed Link.getLinkDirection to return better values for rotated ports when the Node is not rotated.
- GraphObject.getDocumentAngle now returns a normalized angle from 0 to 360, instead of returning an angle between -180 and 180.
Changes for 1.2.3
- Fixed shadow drawing on Parts that had a non-real position.
- Fixed Diagram.isEnabled failing to disable scrollbars.
- Fixed some issues with dynamic Picture loading, and decreased time between tests for loaded images.
- Fixed some errors with odd Diagram sizes, including disallowing negative-sized Diagrams in Internet Explorer.
- Fixed Panel.findRowForLocalY and Panel.findColumnForLocalX when the input was a negative number.
- Auto Panels now correctly measure main Shape elements that have a Shape.geometryStretch of Uniform, such as the figures 'Circle' and 'Square'.
- Auto Panels now correctly re-measure TextBlock elements when the Panel's size changes dynamically (ie, desiredSize).
Changes for 1.2.2
- Added CommandHandler functions: CommandHandler.showContextMenu and CommandHandler.canShowContextMenu.
- Added key-binding for Menu key to invoke CommandHandler.showContextMenu.
- Fixed TextEditingTool sizing in some configurations.
- Shape.strokeDashArray now checks for zero, negative, and non-number values, and there is a fix for non-native dash drawing with offsets.
- Fixed miscellaneous sizing issues with near-zero sized Diagrams.
Changes for 1.2.1
- Fixed non-routing of the original Links after they have been copied.
- Fixed positioning of link label nodes that are Groups.
Changes for 1.2 since 1.1.*
- Added a TypeScript definition file:
release/go.d.ts
for better type-checking when using TypeScript and for Intellisense support in Visual Studio. - Added Extensions of Tool, Layout, and CommandHandler:
- Added the Drag Zooming Tool sample, with the tool defined in DragZoomingTool.js.
- Added the Freehand Drawing Tool sample, with the tool defined in FreehandDrawingTool.js.
- Added the Polygon Drawing Tool sample, with the tool defined in PolygonDrawingTool.js.
- Added the Polyline Linking Tool sample, with the tool defined in PolylineLinkingTool.js.
- Added the Serpentine Layout sample, with the layout defined in SerpentineLayout.js.
- Added the Floor Plan Editor and Floor Plan Monitor samples, demonstrating several tools and a command handler:
- Samples:
- Added the Euler Diagram sample.
- Added the Grafcet Diagrams sample.
- Added the Network Configuration sample.
- Added the Recentering Radial Layout sample.
- Added the Regrouping sample.
- Selection and Tool Adornments are now virtualized:
- Adornments are only created automatically when viewed.
- The "Adornment" Layer's part count will only reflect Adornments created so far.
- Part.adornments will be empty for Parts that should have Adornments (i.e., are selected) but have yet to be viewed. (Part.adornments will never be null.)
- If your app needs Adornments that should exist but are off-screen you can call Part.updateAdornments to create them.
- Trees:
- Added a parameter to Node.findTreeParts to control how much of a subtree is returned.
- Added a parameter to Node.collapseTree and Node.expandTree for controlling how much of a tree is collapsed or expanded.
- Added Node.findTreeRoot method for walking up the chain of tree parent links.
- Added Diagram.findTreeRoots method for finding all root Nodes of trees.
- Added Link.isTreeLink property; set to false to have tree-oriented methods ignore such Links, which is convenient when you want a tree-structured diagram using a GraphLinksModel with additional links connecting the nodes.
- Fixed Node.collapseTree not causing the Diagram to redraw.
- TreeLayout.roots collection now holds TreeVertexes, although Nodes in that collection are still supported for compatibility.
- Added overridable TreeLayout.initializeTreeVertexValues method.
- Added overridable TreeLayout.addComments and TreeLayout.layoutComments methods.
- Added overridable TreeLayout.arrangeTrees method.
- Links:
- Added Link.isOrthogonal read-only property, for convenience in checking the kind of routing a Link does.
- Added Link.getLinkPointFromPoint, Link.getLinkPoint, and Link.getLinkDirection overridable methods, to help customize the computation of link routes where a link connects with a port.
- Added Link.resegmentable and LinkReshapingTool.midHandleArchetype properties to allow users to add and remove straight segments from links.
- Added LinkingBaseTool.portTargeted functional property as an event handler that is called during a linking or relinking operation.
- Added LinkingBaseTool.copyPortProperties and LinkingBaseTool.setNoTargetPortProperties overridable methods, for customizing the behavior during linking and relinking operations, when setting LinkingBaseTool.portTargeted is not enough.
- The LinkingTool and RelinkingTool now autoscroll when dragging the end of a link just inside the edge of the viewport.
- Added Row and Column separators in Table Panels:
- RowColumnDefinition.separatorPadding
- RowColumnDefinition.separatorStroke
- RowColumnDefinition.separatorStrokeWidth
- RowColumnDefinition.separatorDashArray
- RowColumnDefinition.background
- RowColumnDefinition.coversSeparators
- RowColumnDefinition.total
- Panel.defaultSeparatorPadding
- Panel.defaultRowSeparatorStroke
- Panel.defaultRowSeparatorStrokeWidth
- Panel.defaultRowSeparatorDashArray
- Panel.defaultColumnSeparatorStroke
- Panel.defaultColumnSeparatorStrokeWidth
- Panel.defaultColumnSeparatorDashArray
- Diagrams and Layers:
- Added Diagram.findTopLevelGroups method for finding all unnested Groups.
- Added a partialInclusion argument to Diagram.findObjectsNear and Layer.findObjectsNear.
- Added Layer.pickable and GraphObject.pickable properties, to permit visual objects to be ignored by methods such as Diagram.findObjectAt, which in turn allows one to create Parts such as the background grid that cannot get mouse events but are still visible.
- Added Diagram.zoomPoint property, for controlling where to "focus" the diagram contents when changing the Diagram.scale.
- Added Overview.drawsTemporaryLayers property to disable drawing temporary layers.
- Fixed Overview's div setter when changing the div to null and back.
- Fixed the drawing of grid on Overviews.
- Diagram.makeImage now correctly includes or excludes the grid based on showGrid and showTemporary when a parts list is used.
- The viewport now changes size appropriately on browser window maximize and restore.
- When a Diagram's div is hidden in such a way that its clientWidth or clientHeight go to zero, the old viewport width and height are kept at their old values until they are changed to nonzero values again.
- Parts and GraphObjects:
- Added Layer.pickable and GraphObject.pickable properties, to permit visual objects to be ignored by methods such as Diagram.findObjectAt, which in turn allows one to create Parts such as the background grid that cannot get mouse events but are still visible.
- Added methods for finding links between nodes: Node.findLinksTo (in one direction) and Node.findLinksBetween (in either direction).
- Added support for row and column separators in Table Panels -- see paragraph above.
- Added Panel.findColumnForLocalX and Panel.findRowForLocalY.
- Fixed the Panel.data binding of tooltip Adornments for GraphObjects created for items in a Panel.itemArray.
- Fixed Placeholder positioning when a Placeholder has a padding or the Group has a non-default locationSpot.
- Added TextBlock.isUnderline and TextBlock.isStrikethrough.
- Fixed some geometric arc calculations on Geometries with more than one Figure.
- Fixed deletion of label Nodes from Links to remove the key reference in the link data.
- Layouts:
- Added Layout.isRealtime property, to control whether an invalid layout is performed during some tool operations before a transaction is completed.
- Improved LayeredDigraphLayout detection whether links need to be routed around the "from" node or the "to" node.
- TreeLayout.roots collection now holds TreeVertexes, although Nodes in that collection are still supported for compatibility.
- Added overridable TreeLayout.initializeTreeVertexValues method.
- Added overridable TreeLayout.addComments and TreeLayout.layoutComments methods.
- Added overridable TreeLayout.arrangeTrees method.
- Tools and CommandHandler:
- Added ToolManager.dragSize property, for controlling the distance at which the mouse may move before it is no longer considered a click but a drag.
- Added ToolManager.WheelNone; set ToolManager.mouseWheelBehavior to this value to ignore mouse wheel events without disabling scrolling or zooming by other means.
- Stopped Tool.standardMouseOver from being called with the initial Diagram.lastInput.
- On touch-supported devices, the default context menu no longer appears if the right-click was initiated with a mouse.
- Fixed ActionTool to work on a Parts when the whole Part has GraphObject.isActionable set to true.
- Improved ToolManager.positionToolTip and ContextMenuTool.positionContextMenu not to position it left of the left edge of the viewport.
Changes for 1.1.12
- Dragging a selection over a foreign Diagram no longer selects the objects until they are successfully dropped.
- Allowed Diagram and model listeners to modify the listener collection during execution.
- Fixes for Diagram.makeImage. Regardless of the Diagram.documentBounds value, inputting a size and position that are analogous to a Node's actualBounds will always print that node.
Changes for 1.1.11
- Fixed Diagram.zoomToRect scaling to default to Diagram.Uniform, not Diagram.UniformToFill. Added an optional scaling argument to Diagram.zoomToRect so that you can choose the behavior.
- Fixed GridLayout.doLayout to take an Iterable collection of Parts.
Changes for 1.1.10
- Fixed some cases of Link routing when Link.adjusting is Link.End.
- Fixed Diagram.makeImage when Diagram.documentBounds X and Y values are non-zero.
Changes for 1.1.9
- Fixed route invalidation of not visible Links.
- Created a workaround for an IE10 bug that disallowed double clicking.
- Fixed the initialization of Node.isTreeLeaf when changing the category of a Node.
- Fixed Diagram.grid's updating when toggling GraphObject.visible.
Changes for 1.1.8
- Fixed Diagram.findObjectsAt and Diagram.findObjectsIn not to throw away the argument results collection.
- Fixed the ResizingTool Adornment location on Shapes with large strokeWidths.
- Fixed some nested objects (Panels, Picture, and Shapes) with a scale and a stretch value measuring incorrectly.
- Changed Links to be not seen when a connected Node is not seen, if the Link is a member of a Group, rather than appear to connect with the Group that contains it.
Changes for 1.1.7
- Fixed addition and removal of Parts from the temporary layers causing the diagram's bounds to update.
- Initial Diagram setup such as Diagram.initialContentAlignment now occurs at the end of the first transaction, not at the transaction's start.
- Fixed GraphObject.alignment so that it correctly re-measures the GraphObject in all cases.
- Fixed updating of tooltips when the viewport changes without any mouse move.
- Fixed TableRow and TableColum visibility within Table Panels.
- TwoWay Bindings now update data properties by calling Model.setDataProperty, thereby updating other bindings on the same property.
Changes for 1.1.6
- Added Parse Tree sample.
- Improved the State Chart and Dynamic Ports samples to remember Link routes by using TwoWay Binding on the Link.points property.
- Fixed hiding Links in collapsed trees when the tree is inside a Group.
- Fixed Diagram.position setter incorrectly modifying values.
Changes for 1.1.5
- Fixed Arcs with negative radii made using Geometry.parse.
- Corrected NaN locations when copying Parts under certain conditions.
- Fixed Diagram.makeImage padding and background grid rendering, and padding can no longer be negative.
Changes for 1.1.4
- Fixed rules for Part.addAdornment or Adornment.adornedObject causing an Adornment to adorn a different part.
- Fixed Diagram.minScale and Diagram.maxScale when using a Diagram.autoScale values other than Diagram.None
- Fixed incorrect autoScrolling when Diagram is zoomed.
- Added support for Android pinch-zooming and fixed Diagram.zoomPoint setting during pinch zoom.
- Fixed the drawing of the background Grid during Diagram.makeImage
Changes for 1.1.3
- Added Sequence Diagram sample.
- Improved behavior of LinkingBaseTool.findTargetPort when the LinkingBaseTool.portGravity is a small value.
- Improved "AvoidsNodes" link routing not to compute special route when default orthogonal routing does not cross over any nodes.
- Improved the behavior of LinkReshapingTool when dragging a reshape handle adjacent to the end point of a link that is connecting with a port for which Spot.isNoSpot is true.
- Fixed layouts with Layout.isViewportSized not redoing their layout when the Diagram's viewport changed size.
Changes for 1.1.2
- Fixed Geometry.stringify not to round off coordinate values.
- Automatically set Tool.diagram for tools that are added to any of the three ToolManager tool lists.
Changes for 1.1.1
- Many enhancements to the Pipes sample.
- Improved "AvoidsNodes" link routing within groups.
- Double-click implemented on touch devices.
- Fixed copying collections declared to hold Objects.
- Fixed un-handled mouseup events not bubbling.
- Fixed updating Nodes that are modified in the middle of a Diagram update.
- Fixed positioning of asymmetric background Grid Panel patterns.
Changes for 1.1 since 1.0.*
- Incompatible changes 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 now 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 named property arguments for Diagram.makeImage and Diagram.makeImageData can now specify "size", "maxSize", "padding", and "background" of the resulting Diagram image. The new named property arguments "position" and "scale" control what area of the document is drawn. The "parts" and "omitTemporary" property arguments control which Parts are drawn.
- 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.
- Added double-click functionality for mobile devices
- 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. - Added Part.findTopLevelPart method.
- 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 Shape.strokeDashArray and Shape.strokeDashOffset properties, to draw customizable dashed or dotted lines.
- Fixed some cases of GraphObject.stretch improperly affecting GraphObject.margin calculations.
- Added PathSegment.SvgArc enum value to allow the creation of SVG-like arcs. Geometry.parse now parses SVG "a" commands as well as GoJS-specific commands. See Geometry Path Strings for details.
- Added Geometry.stringify static method, as the opposite of Geometry.parse. This saves the complete state of a Geometry object, except for the Geometry.spot1 and Geometry.spot2 hints for Shape figures.
- Added Geometry.fillPath static method, to help convert SVG geometry path strings to GoJS.
- 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.
- 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.
- Fixed GraphObject clipping in Panels.
- 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 Model.addArrayItem, for completeness -- this just calls Model.insertArrayItem.
- Added Iterator.first method for your convenience.
- Fixed Model.setDataProperty for objects in item Arrays in GraphLinksModels.
- 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.
- Added LayoutNetwork.findAllParts method.
- 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.
- Fixed CircularLayout Packed arrangement occasionally causing an exception and improved it for full circles and for 3 or 4 nodes.
- Tools and Commands:
- Added CommandHandler.zoomToFit command, invoked by
Shift-Z
. Invoke it twice in a row to restore the original viewport. - Added CommandHandler.zoomFactor property, so that you can easily change how much CommandHandler.decreaseZoom and CommandHandler.increaseZoom change the Diagram.scale.
- 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.
- Improve 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
Changes for 1.0.8
- Fixed some Bezier Links not displaying correctly.
- Fixed Position, Horizontal, and Vertical Panels not respecting some padding values.
- Picture now appropriately handles Canvas elements as the Picture.element.
- Fixed Panel.Auto measuring incorrectly when the main object was a Shape.
- Fixed ContextMenuTool to also raise a DiagramEvent when a context click happens.
- Fixed Placeholder objects not respecting padding when not part of a Group.
Changes for 1.0.7
- Fixed asynchronous Picture loading failing to update the Diagram.documentBounds.
- Fixed DraggingTool to move Parts to the mouse-up location, not the last mouse-move location.
- Use
Array.isArray(x)
instead ofx instanceof Array
to check for Arrays created in different frames. - Fixed replacing the model not respecting Diagram.contentAlignment.
Changes for 1.0.6
- Added "Links to Links" sample.
- Added "Shop Floor Monitor" sample.
- Changed a Link to have a jump-over or a jump-gap with another link if they do not share the same start points or the same end points, even if they connect with the same node.
- Improved Diagram.add to check that the argument Part is not already a part of a different Diagram.
- Fixed copy and paste not to copy partly or fully disconnected Links.
- Fixed the updating of jump-overs or jump-gaps in other links after adding or removing links.
- Fixed undo/redo changes of Z-ordering of Panel elements.
- Fixed Group Z-ordering when adding groups or switching layers.
- Fixed link validation check of GraphObject.fromMaxLinks or GraphObject.toMaxLinks when links were already connected in both directions.
- Fixed an issue with Table Panels not accounting for GraphObject.padding properly.
Changes for 1.0.5
- Added "HTML Interaction" sample.
- Added Diagram.focus method.
- Improved more API documentation.
- Improved error checking by Panel.add to disallow sharing of a GraphObject by Panels.
- Setting Part.category of a Node or Link or simple Part now also tries to set the category of any bound data in the model.
- Fixed dynamically changing the Part.category of a Link that connects with specific ports to remember those port Ids.
- Fixed Diagram.skipsUndoManager property setter to also set the Diagram's Model's Model.skipsUndoManager.
- Fixed some issues relating to scrollbars, especially on small diagrams.
Changes for 1.0.4
- Improved API documentation for some classes.
- Improved error message when running in browsers without support for Canvas.
- Fixed hit testing of individual Panel.Grid Panels
- Fixed the default touch context menu to no longer scroll to the top of the page when a button was pressed.
- Changed the way GoJS handles event coordinates, increasing accuracy on complex HTML pages.
Changes for 1.0.3
- Added "Planogram" sample.
- Fixed ResizingTool modifying the saved ResizingTool.minSize.
- Diagram.selection read-only-ness is now enforced.
- Fixed Panel.Table Panel allocating an incorrect size for some stretched objects.
- Fixed TextBlock not respecting maximum height.
- Fixed Panel.Grid incorrect hit testing (object picking).
Changes for 1.0.2
- Added "Swim Lanes" sample.
- Fixed DraggingTool updating the bounds of a containing Group when Group.computesBoundsAfterDrag is true.
- Fixed a single Shape inside of a Panel.Auto Panel getting the wrong size if only GraphObject.minSize was set.
- Improved measurement of nested Groups during automatic layouts.
Changes for 1.0.1
- Added "Record Mapper" sample.
- Removed deprecated "closed" argument to PathFigure constructor.
- Fixed LayeredDigraphLayout routing of Bezier Links connecting with visible Nodes inside Groups.
- Fixed sizing Panel.Auto Panels with a Panel as the main element.
- Initialization bugfixes.