GoJS Change Log
We maintain a GitHub Repository,
which you can star to follow version updates.
We also notify of changes on Twitter.
GoJS 2.2
GoJS 2.2 introduces a number of properties and methods for convenience and to improve customization.
GoJS 2.2 also includes new methods for constructing objects, and enhances TypeScript
typings support.
GoJS 2.2 also includes several performance enhancements when drawing large graphs, reduced memory usage,
and more efficient replacing or merging of item Arrays.
Some of the samples and written documentation have been upgraded to use more modern JavaScript: class
es,
arrow functions, const
and let
, so the samples and documentation might no longer be viewable
using old browsers such as Internet Explorer 11 or some old Android browsers.
The library and the extensions continue to target ES5 (ES2012), so that apps using the library can still work on IE11.
Method Chaining and New Ways to Build Objects
In GoJS 2.2 many methods that previously returned void
now return the method's instance, to promote
method chaining.
GoJS 2.2 also introduces several new methods or arguments to allow type-checking of settings by compilers and in text
editors.
Several existing methods now return their instance:
GraphObject constructors now accept one or two optional arguments. The first is the value for a common property,
and the second is a JavaScript Object detailing properties to initialize. For example, one can now write:
new go.TextBlock("Some Text", { margin: 5 })
new go.Picture("sourceURI.png", { width: 30, height: 30 })
new go.Shape("RoundedRectangle", { fill: "blue", stroke: "yellow" })
new go.Panel("Auto", { padding: 10, background: "green" })
This means that one can now write code like:
// Create a Node and add a Shape and a TextBlock to it:
myDiagram.nodeTemplate =
new go.Node("Vertical")
.add(new go.Shape({ width: 40, height: 40, fill: "white" }) // default width & height & fill
.bind("width") // binds data.width to Shape.width
.bind("height")
.bind("fill", "color") // binds data.color to Shape.fill
.bind("figure", "fig")) // data.fig should be the registered name of a geometry figure generator
.add(new go.TextBlock("(no name)", // default string to display
{ isMultiline: false, editable: true })
.bind("text", "name", null, null)); // TwoWay Binding of TextBlock.text with data.name without converters
New methods GraphObject.set and Diagram.set return their instance.
When using TypeScript definitions, the compiler checks these calls for GraphObject and Diagram property existence and
value types.
New method GraphObject.apply can be used to define common functions that provide settings and bindings.
Such customizations can then be applied to a GraphObject that you are initializing by calling GraphObject.apply
with that function.
Together, these changes remove the need to use GraphObject,make when concisely defining Diagrams and templates.
For a complete example, this code:
const $ = go.GraphObject.make;
const myDiagram = $(go.Diagram, "myDiagramDiv",
{
"undoManager.isEnabled": true
});
myDiagram.nodeTemplate =
$(go.Node, "Auto",
$(go.Shape, "RoundedRectangle",
{ strokeWidth: 0, fill: "white" },
new go.Binding("fill", "color")),
$(go.TextBlock,
{ margin: 8, font: "bold 14px sans-serif", stroke: '#333' },
new go.Binding("text", "key"))
);
Can now be written as:
const myDiagram = new go.Diagram("myDiagramDiv",
{
"undoManager.isEnabled": true
});
myDiagram.nodeTemplate =
new go.Node("Auto")
.add(new go.Shape("RoundedRectangle", { strokeWidth: 0, fill: "white" })
.bind("fill", "color"))
.add(new go.TextBlock({ margin: 8, font: "bold 14px sans-serif", stroke: '#333' })
.bind("text", "key"));
For more information and examples, see the intro page on Building Objects.
General New Features in GoJS 2.2
-
Spot Panels now support Panel.alignmentFocusName on the main element.
This can be useful for creating Spot panels with multiple item arrays that align to the same main element.
There is an example of this property in the
Spot Panel section of the Panel intro page.
-
The Diagram.autoScrollInterval property controls the milliseconds between autoscroll events.
-
The Diagram.delayInitialization's argument function is now a passed a reference to the Diagram.
-
The Overview.drawsGrid and Overview.updateDelay properties control drawing by an Overview.
-
The CommandHandler.isZoomToFitRestoreEnabled property controls whether the CommandHandler.zoomToFit
command ever restores the previous Diagram scale and position.
-
The DraggingTool.copyCursor, DraggingTool.moveCursor, and DraggingTool.nodropCursor properties
modify the cursors during a drag.
-
The LinkingBaseTool.linkingCursor property modifies the cursor during linking.
-
The GraphObject.findBindingPanel method walks up the visual tree to return the first Panel whose
Panel.data is bound to data.
Used in the Hyperlink sample.
-
The Panel.copyTemplate method makes a deep copy of a Panel, including its Bindings, to allow use of the
result in templates.
This is used in LinkLabels In Front sample.
-
The TextBlock.formatting property controls the policy of trimming whitespace on TextBlock text.
This can be useful when text strings are preformatted.
-
The TextBlock.lineHeight read-only property provides better information about how the text is being measured
and rendered.
-
The TextBlock.spacingAbove and TextBlock.spacingBelow properties
better control the measuring and rendering in addition to the TextBlock.lineHeight.
-
The Node.findExternalTreeLinksConnected method returns a collection of Links that connect with this Node
or any in its subtree, excluding any isTreeLink Links.
This is the tree-equivalent of Group.findExternalLinksConnected for Groups/subgraphs.
-
The Node.findVisibleNode method walks up the chain of Node.containingGroups to find the first node
that is visible.
This can be overridden to change behavior, as it is in Tree
Mapper sample.
-
The PanelLayout.remeasureObject method forces a specific GraphObject (but none of its containing panels) to
remeasure.
This can be useful implementing custom layouts.
-
The DraggingTool now optimizes transactions to reduce memory usage by only saving the first and last drag
changes.
This can be changed by overriding DraggingTool.stopTransaction.
-
The Binding constructor now accepts a back-converter as an argument.
A null or function argument value as the fourth argument will automatically call Binding.makeTwoWay> for you.
Not supplying the fourth argument or passing it undefined will leave the Binding OneWay, as it has in the past.
-
The RadialLayout extension by default spreads the children better.
-
The TextEditingTool now stops any default animation when the tool is activated.
-
The TextEditingTool now respects the vertical alignment when a TextBlock is taller than its text.
-
InputEvent.bubbles allows events to bubble beyond the Diagram div.
This can be useful in CommandHandler and Tool method overrides.
-
For some testing environments: Diagram,isUsingDOM and Diagram,useDOM
can query and control the GoJS library's expectation of a DOM existing.
-
Fixed a regression from 2.1.29 where some links may update their geometries outside of a transaction.
-
Potentially incompatible: Touch and Mouse events have been replaced internally with Pointer events.
The GoJS API has not changed, nor has its behavior, as long as the browser is not so old that it does not implement
pointer events.
Easier Manipulation and Customization of Geometries
GoJS 2.2 contains new methods to simplify geometric calculations and more easily customize geometries.
-
Point,intersectingLineSegments is a static function that returns true if two finite straight line segments
intersect each other.
-
Rect,intersectsLineSegment is a static function that returns true if a rectangular area is intersected by a
finite straight line segment.
-
Point,compareWithLineSegment is a static function that compares a point with a finite straight line segment,
given x,y numbers.
Point.compareWithLineSegmentPoint is a method that performs the same comparison, but on Points.
-
Geometry.containsPoint is a method that returns true if the Geometry contains a given point.
-
The Link.routeBounds read-only property returns the bounds of the Link geometry in document coordinates.
Used in the BalloonLink sample.
-
The Node.getAvoidableRect method returns the area to be avoided for this node,
by default equal to the node's GraphObject.actualBounds plus the Node.avoidableMargin.
This method can be overridden to customize AvoidsNodes routing behavior near a node to account for the visual area
occupied by the node
being smaller than the full rectangular bounds of the node.
-
Groups now implement Panel.isClipping.
If set to true on a Group and if the group has a Group.placeholder,
the group will visually clip its member nodes and links.
This does not change how those parts are measured, nor does it affect how those parts may be positioned.
-
The Layer.isInDocumentBounds property allows finer control of which layers are part of the
Diagram.documentBounds.
Before 2.2, only layers with Layer.isTemporary set to true were excluded from the document bounds (and could
not be explicitly included).
-
The ResizingTool.oppositePoint property returns the Point opposite to the chosen, dragged handle of the
"Resizing" Adornment.
This allows customizations like the
LimitedGroupResizingTool sample,
which demonstrates a custom tool to allow resizing groups while disallowing the group to resize smaller than its
members,
and also disallowing the group to expand to cover any non-member nodes.
-
The
RoundedRectangles
extension code now includes definitions for the "RoundedLeftRectangle" and
"RoundedRightRectangle" figures.
The definitions for all four "Rounded...Rectangle" figures has been modified slightly to better match the curves of
a full "RoundedRectangle".
Changes for 2.2.22
-
Disallow browser wheel events on the Diagram canvas from bubbling if the wheel has a horizontal component.
This bubble prevention also prevents the browser in some systems from
-
Fixed a bug where resetting Picture.source to the empty string may cause a property set error.
Changes for 2.2.21
-
Improved Link.makeGeometry so that overrides do not need to test for situations where a Link has fewer than
two points.
-
Improved shadows when Diagram and Part are scaled.
Changes for 2.2.20
-
Improved LinkingTool.doActivate to assign the location of the LinkingBaseTool.temporaryToNode
(or the LinkingBaseTool.temporaryFromNode, if drawing a link in the reverse direction)
so as to avoid momentarily seeing where the temporary node had been the last time the user tried to draw a new link.
-
Corrected functionality when a browser cancels a Pointer event (for instance when the browser is minimized during
ongoing Pointer events).
-
Corrected GraphObject.mouseLeave sometimes not getting called when the user's pointer leaves the Diagram.
-
Fixed iOS Safari text highlighting when dragging Pointer events out of a Diagram.
-
Fixed a regression from 2.2.18 where link JumpOvers might cause "Change not within a transaction" warnings on model
load.
Changes for 2.2.19
-
Event fix for some platforms that reimplement DOM functionality (Polymer and Salesforce Aura components).
-
Graduated panels no longer display shadows on Shape and TextBlock elements when those elements explicitly disable
shadows with GraphObject.shadowVisible.
Changes for 2.2.18
-
Fix for some initialization animations which could set Part.location incorrectly.
-
Fixed operation of the LinkShiftingTool extension when the mouse is inside the connected node.
-
The TypeScript extensions are now compiled with options
"noImplicitOverride": true, "noUnusedLocals": true
.
-
Fix since 2.2.0: Link bounds now always contain all JumpOvers.
-
Fix since 2.2.0: When a Diagram.autoScale is applied, dragging Parts outside of the viewport now reliably
triggers a redraw.
Changes for 2.2.17
Changes for 2.2.16
Changes for 2.2.15
-
Fixed non-Path Geometry copies not to have a null value for Geometry.figures.
-
Improved the calculation of the midpoint of Bezier curve Links that have exactly three points in their route.
-
Fixed some empty Table panels causing an exception.
-
Loading the GoJS library twice is now a console warning, instead of an error.
Changes for 2.2.14
-
Diagram Layouts with Layout.isRealtime set to
true
will no longer attempt real-time layouts
during the DraggingTool operation.
-
Graduated Panels now deal with highly precise floating point numbers more accurately.
Changes for 2.2.13
-
Fixed asynchronous model loading which might intermittently fail to perform AvoidsNodes routing.
-
Enhanced the ArrangingLayout extension to support placing the side nodes about the middle of the side,
by supporting values such as
go.Spot.Bottom
for the ArrangingLayout.side property.
-
Improved the "HyperlinkText" builder extension so that it works by default in Adornments and
other Parts that are in temporary layers, by setting GraphObject.isActionable to true.
-
Table panel separator strokes no longer draw if a row or column is empty of visual elements,
and will not draw a separator above the first-rendered row/col.
Changes for 2.2.12
-
We have been optimizing the space used by GraphObjects.
The heap used by typical large diagrams now occupies about 10% less space.
Creating copies of a lot of nodes and links may be a bit faster now too.
-
Fixed the new PanelLayoutFlow extension so that multiple "Flow" panels can coexist in the same panel.
-
Improved GenogramLayout in the Genogram sample
to support a horizontal direction as well as the standard vertical direction.
-
Improved the Selectable Fields
and Selectable Ports
samples so that clicking on fields or ports within a node respects the Control and Shift modifiers
to toggle or add to the collection of selected fields or ports.
-
Fixed object picking (Diagram.findObject, GraphObject.containsPoint, etc) for Shapes with a
GraphObject.background.
-
The Group.layout property setter now checks to make sure that the new layout is not also the value of
Diagram.layout.
Changes for 2.2.11
-
Like the DraggingTool in v2.2.0, LinkReshapingTool, ResizingTool, and RotatingTool now
optimize transactions
to reduce memory usage by only saving the first and last changes for each property of each object in the
transaction.
This can be changed by overriding stopTransaction on the respective tool.
-
Shape.graduatedSkip, TextBlock.graduatedSkip, and TextBlock.graduatedFunction
now take a second argument, the Shape or TextBlock that the function is being called for.
-
Graduated Panels now correctly draw ticks/labels at very large Panel.graduatedMax values.
-
The AMD
define
statement has been removed from the module version of the library
(go-module.js
, go.mjs
, go-debug-module.js
)
-
The DraggingTool, when dragging a Link (DraggingTool.draggedLink), now passes that link as the
RelinkingTool.originalLink
so that link validation predicates are passed that link.
-
Disconnected links now support setting Part.locationSpot.
Changes for 2.2.10
-
Graduated panels now draw all tick marks specifying a Shape.graduatedSkip/TextBlock.graduatedSkip
function,
even when they could be very close together.
-
Fixed drawing on very zoomed-out graphs.
-
Multiple orthogonal links between identical nodes side-by-side are now drawn without crossings. This fixes a
regression from 2.1.51.
Changes for 2.2.9
-
Fixed a regression from 2.2.8 with Table Panel when tables are empty (including tables in Node templates).
Changes for 2.2.8
-
Improved Table Panel measuring when using TableRows and TableColumns in sparsely populated tables.
-
Improved Table Panel arranging of items that span several rows or columns, when those rows or columns do not all
exist.
-
Animation fixes when AnimationTriggers execute during a drag.
-
Improved accuracy of tick angles along curves in Graduated panels.
-
Fix for two-way bindings on Part.location when undoing.
-
Calls to Diagram.makeImage and Diagram.makeImageData no longer throw exceptions when attempting to
render "broken" images.
Changes for 2.2.7
-
Nested or space-constrained Table Panels apportion space more correctly when some Table elements are stretched
and other rows/columns have their width or height set.
-
Improved the ScrollingTable extension to include a scrollbar "thumb".
Changes for 2.2.6
-
Made improvements in gesture handling for iPad + keyboard combinations.
-
Made improvements and added features to the Gantt
and Donut Charts samples.
-
Drag and drop from a Diagram into empty page space no longer throws an error (regression in 2.2.4).
-
Data Inspector, when
multipleSelection
option is true,
now clears the properties fields when the Diagram.selection is empty.
Changes for 2.2.5
-
Drag and drop across Diagrams fixed on touch devices (regression in 2.2.4 for non Shadow DOM environments).
-
Module versions of the library
release/go.mjs
and release/go-module.js
now export
go
as the default export.
Changes for 2.2.4
-
Allow AnimationTriggers to run during Tool operation.
Previously, Animation Triggers would not run if a Tool was active,
which prevented some tools such as LinkingTool from starting animations during their events.
-
Fixed a regression since 2.2.0: Drag and drop in Shadow DOM environments such as Angular
now correctly identify the target Diagram (for dropping from Palettes, for instance).
-
Diagram,useDOM and Diagram,isUsingDOM were incorrectly minified, and now have their names properly
exposed.
Changes for 2.2.3
-
Fixed Spot Panels erroneously giving incorrect sizing information to its elements if a previous element had a
stretch.
-
Improved LayeredDigraphLayout routing of Bezier curve links to reduce crossing over nodes.
-
Fixed optimization (in 2.0.0) of Panel.rebuildItemElements when item template(s) may have changed.
-
The
package.json
now specifies "module": "release/go-module.js"
Changes for 2.2.2
-
Added
init
optional argument to Brush constructor.
-
Stopped tap-hold on some versions of iOS Safari from selecting text.
-
Improvements for licensing Electron apps.
Changes for 2.2.1
GoJS 2.1
New Animation Capabilities
GoJS 2.1 contains a number of new features to animate different components of your Diagram.
See the Intro page on Animation
and the Custom Animation sample for more details and
examples.
Improved Support For Data Synchronization
GoJS 2.1 contains some new methods to ease integration of GoJS diagrams in applications that maintain their own
data, particularly React apps.
See the Intro page on using GoJS with React and
the gojs-react example project
for details and examples.
Also see gojs-react, a package
containing React Components for GoJS Diagrams, Palettes, and Overviews.
Other Changes for 2.1.0
Changes for 2.1.56
-
Updated the root object for systems that define
window
but do not attach all global variables to it.
GoJS now prefers globalThis
if it exists, then global
.
Changes for 2.1.55
Changes for 2.1.54
Changes for 2.1.53
-
Fixed Binding.ofModel binding when there is no Diagram and thus no Model to just ignore the
binding.
-
Fixed a regression in Diagram.makeSVG from 2.1.49 when using a Panel,Spot with Panel.isClipping
set to
true
,
where some elements would get grouped and positioned incorrectly.
-
Fixed Model.toJson output when object keys contained unescaped double-quote characters.
-
Fixed some Shape Geometry intersections (such as with Link connections) when the Shape's Geometry contained small
and flat beziers.
-
Fixed collapsed Parts incorrectly causing their Groups to remeasure, which may have caused Group's connected Links
to re-route.
Changes for 2.1.52
-
Fixed animations incorrectly resetting some link routes.
-
Fixed custom animations improperly adding state to the AnimationManager.defaultAnimation.
-
Fixed a regression in 2.1.51 where un-modeled parts containing Images, that are added before a model is set, may
fail to load.
-
Fixed a regression from 2.1.50 when Picture.errorFunction was used to modify the Picture.source or
Picture.element, which would cause a "Collection was modified during iteration" error.
Changes for 2.1.51
-
The TextEditingTool, when the user has entered an invalid text string, has always called any
TextBlock.errorFunction and then continued showing the text editor so that the user could fix their text
entry.
The TextEditingTool.doError method now calls any TextBlock.errorFunction and
also calls HTMLInfo.show on the TextEditingTool.currentTextEditor.
This will allow an override of TextEditingTool.doError not to continue showing the editor.
If you have not overridden that method, which was new in 2.1, this change will not affect you.
-
Fixed Model,fromJson not to substitute instances of classes such as Point and Size when the
Object's
"class" property had a value that is "Point" or "Size".
The property value must be what is produced by Model.toJson, which uses values such as "go.Point" or
"go.Size".
The documentation lists all of the substitution cases that Model,fromJson handles.
-
Fixed a regression from 2.1.43 which caused some links to animate routes incorrectly upon dragging.
-
Fixed loading Images used as a Picture.element.
-
Improved some AvoidsNodes routing of Links when connecting Nodes in different Groups and the Groups are not
Group.avoidable.
-
Fixed using multiple license keys.
Changes for 2.1.50
-
Enhanced the LinkShiftingTool extension to support links that are only connected at one end.
-
Fixed CommandHandler.doKeyDown to support Robot.keyDown use of "F2" and "ContextMenu" keys.
-
Improved routing of AvoidsNodes links that have a "to" end segment with a direction that is a multiple of 45 (but
not 90) degrees.
-
Fixed diagram not redrawing after images load in frameworks that use a shadow DOM, such as Angular.
-
If you call TextBlock,setBaseline or TextBlock,setUnderline outside of your diagram initialization,
you should also call Diagram.redraw on all Diagrams.
Changes for 2.1.49
Changes for 2.1.48
Changes for 2.1.47
-
Fixed Diagram.layoutDiagram not performing a layout immediately if called within an ongoing Diagram update
(such as during a DiagramEvent like
"InitialLayoutCompleted"
).
-
Fixed Panel.itemTemplate so that it is used, not the default item template, when the panel cannot find any
template with the given category name in the item data.
-
Diagram.viewSize, if set, now takes precedence over the size of the Diagram.div.
It is not typical to set both a DIV and the
viewSize
, but in environments where a DIV is set
automatically
it may be useful for testing purposes to set an explicit viewSize
as well.
Changes for 2.1.46
-
Fixed indefinite animations causing some transactions to skip the UndoManager.
-
Fixed Diagram.makeImageData to draw any other Parts in the "Grid" Layer besides the Part holding the
Diagram.grid
when the
showGrid
option is true but the showTemporary
option is false.
Changes for 2.1.45
-
Fixed a bounds calculation bug with PathSegment,SvgArcs, when the arc has a zero X or Y radius value.
-
Link route calculations now avoid an effectively infinite loop due to floating point errors when the two ports
almost exactly overlap each other.
-
Fixed an occasional exception when dragging a disconnected link when the link had no points in its route.
-
The GraphObject.naturalBounds of a Shape now always prefers GraphObject.desiredSize if it
exists, over the Shape's Geometry.bounds.
These are usually the same, but a Geometry with beziers can be slightly off from the desiredSize used to create it.
Changes for 2.1.44
-
Fixed a regression from 2.1.28 with some Shape.geometryString paths.
If a path contained an arc command that was closed, a relative move command afterwards would be at
the wrong coordinates.
Changes for 2.1.43
Changes for 2.1.42
Changes for 2.1.41
Changes for 2.1.40
-
Fixed some styling and missing files in the web site as a result of the reorganization in 2.1.39.
-
Simplified the Storage and FloorplannerTS projects.
Changes for 2.1.39
-
Reorganized GoJS kit and site.
gojs
package no longer contains jQuery, and samples that reference
jQuery use a CDN.
-
Fixed animating the position of GraphObjects inside a Position Panel.
Changes for 2.1.38
-
Table panel fixes with stretch elements, this includes a regression fix from 2.1.35.
-
Fixed a regression (for IE11 only) from 2.1.37, which broke mouse events.
Changes for 2.1.37
-
Added an Introduction page about Testing with Jest and with Cypress.
-
Fixed some scenarios with Table Panels not apportioning space correctly when elements stretched
and rows/columns had minimums or maximums set.
-
Fixed touch-dragging between Diagrams in frameworks that use a shadow DOM (like Angular).
-
Fixed routing invalidation of links to nodes in collapsed groups that have "...Sides" Spots.
-
Fixed shadows on unfilled PathFigures when a GraphObject.fill was set. This mostly presented itself
when shadowing bezier or orthogonal Link paths.
This fix may cause Links with a Link Label to draw a shadow on the Link path where none was previously. If you do
not want the Link path shaded, you must set
GraphObject.shadowVisible to
false
on the Link path Shape.
Changes for 2.1.36
-
Fixed "Graduated" Panels rendering of final tick mark in some cases where due to floating point errors
the tick mark was not drawn.
-
Fixed Link.getLinkPointFromPoint for some cases where the start point was inside the target port shape.
-
One can now avoid invalidating the routes of other links that connect the same pair of ports
when links between them are added or removed, by setting Link.curviness to a number such as zero.
Changes for 2.1.35
-
Fixed jitter that occurred when dragging between diagrams with a modifier key held down.
-
When dragging between diagrams, fixed the loss of routing of partly or fully disconnected reshaped links
that have TwoWay Bindings on "points", and fixed the positioning of multiple fully disconnected links.
-
Fixed a shadow-drawing bug that could occur when Part.isShadowed is false but
GraphObject.shadowVisible is true.
Changes for 2.1.34
-
Improved performance for off-screen Adornments and Parts.
-
Fixed exception regarding Workers when running in a web Worker.
Changes for 2.1.33
-
Improved AvoidsNodes routing performance for many common cases.
-
Improved ContextMenuTool.canStart to return false for double or triple context clicks.
Changes for 2.1.32
Changes for 2.1.31
-
Fixed a regression since 2.1.30 where the library might not load in React or Angular environments, and a TypeError
would be thrown.
-
Fixed dragging of links connected with snapped nodes when the grid cell size was not an integer,
causing the links to slowly shift over time.
-
Fixed rendering of background in images drawn by Diagram.makeImageData when the whole page has been scaled to
be less than 100%.
-
Fixed Diagram.delayInitialization when calling code that prompts the Diagram to update immediately
afterwards.
-
Fixed premature routing of links in Groups that start off collapsed (with Group.isSubGraphExpanded set or
bound to false).
-
Fixed animation that might revert some routes when the initial animation was turned off.
-
Link.computeAdjusting now only returns Link,End during animation only when routing is AvoidsNodes.
-
Fixed a regression since 2.1.29 where an Overview would not update with a newly set Overview.observed
Diagram
and a newly displayed HTMLDivElement until some activity happened on that observed Diagram.
Changes for 2.1.30
-
Changed the behavior of GraphLinksModel so that the use of a key of a non-existent node
can be resolved by adding a node with that key in a later transaction, not just in the same transaction.
-
Fixed routing of duplicate orthogonal links between ports with "...Side" Spots to avoid producing little loops
when the ports are close to each other.
-
Fixed ContextMenuTool to automatically stop running if the newly shown context menu is
a not-GraphObject.visible Adornment.
-
Fixed exception on expanding a Group whose member nodes had partly disconnected links.
Changes for 2.1.29
Changes for 2.1.28
-
Added the Diagram.ensureBounds method.
Like Part.ensureBounds, this is useful when you need the document bounds computed immediately.
It is rare that you will need to call either method, because the normal updating process will
perform the computations for you as part of a transaction, asynchronously.
-
Fixed some parsing issues when using Geometry.parse or Shape.geometryString with SVG arcs.
-
Fixed the Picture.source setter from failing in non-DOM environments.
-
Fix for DOM-less environments that do not have
setImmediate
defined.
-
Fix for Link routing when connecting to the edge of an arc segment.
Changes for 2.1.27
-
Fixed the routing of links connected with nodes that are members of expanded groups inside collapsed groups.
-
Fixed some Shapes in Link Selection Adornments inheriting their
strokeWidth
from the Link.
Only the main path Shapes of Link "Selection" Adornments with a strokeWidth
of 0 will inherit
the strokeWidth
from the adorned Link.path Shape.
-
Fixed changing Picture.source back to an empty string not to throw an unnecessary error.
Changes for 2.1.26
-
Added a
ResizeObserver
to automatically detect changes in the size of the
HTMLDivElement (the Diagram.div) in recent browsers.
You will still need to call Diagram.requestUpdate when running in older browsers or in Internet Explorer.
-
Added the ResizingTool.dragsMembers property, for controlling whether resizing a
Group may move its Group.memberParts if it has no Placeholder.
-
Fixed regression since 2.1.24 causing some diagrams not to be drawn even after calling Diagram.requestUpdate.
-
Fixed some cases of finding the nearest intersection point of Bezier curves with a straight finite line.
Changes for 2.1.25
-
Added the Connection Box Node sample,
showing nodes that allow links between ports within a node.
-
In order to avoid possible errors caused by loading the GoJS library more than once,
an Error is thrown when a second load is detected, even if the version number is the same.
This helps avoid problems where there are multiple definitions for each of the classes, causing errors such as:
Error: Unknown type of binding target: Node#241
, where the object is a GoJS Node,
but not the same GoJS Node class as the code expects.
It also helps avoid situations when both the release library and the debug library are loaded.
-
Fixed raising an extraneous Diagram.mouseOver event during initialization.
-
Fixed a regression since 2.1.0 that would prevent a Diagram or Overview from re-scaling or aligning when its DIV
changed size.
-
Fixed invalidating routes of external links when nested groups change their visibility in ways
other than expanding trees or subgraphs.
-
Fixed Model.mergeNodeDataArray, GraphLinksModel.mergeLinkDataArray, and
Model.applyIncrementalJson
to set known properties, eg. GraphLinksModel.nodeGroupKeyProperty, even when the property is not present on
the new data.
Changes for 2.1.24
-
Added the Multi-color Links sample,
showing links whose paths can be stroked with multiple colors specified in an Array
as the value of the link's
data.colors
.
-
Associating a Diagram instance with an HTMLDivElement now causes that Div element to get two new properties:
"goDiagram" to refer to that Diagram instance, and "go" to refer to the "go" namespace if it exists.
This makes it easier to examine or set Diagram properties or to call Diagram methods or methods on GraphObjects
in existing apps without access to the app's source code.
-
Fixed using subclasses of GraphLinksModel or TreeModel.
-
Fixed AnimationTriggers incorrectly starting when AnimationManager.isEnabled is set to
false
.
-
Fixed extraneous Transaction ChangedEvents when modifying a group invalidated a layout.
Changes for 2.1.23
Changes for 2.1.22
-
Added the Rescaling Tool extension,
demonstrated in the Rescaling sample.
This tool modifies the GraphObject.scale property,
unlike the ResizingTool which modifies the GraphObject.desiredSize property.
-
Improved performance of Model.mergeNodeDataArray, GraphLinksModel.mergeLinkDataArray, and
Model.toIncrementalData.
The merge methods require that references are not shared between the the GoJS model and the external data provided
and will now make deep copies
of any new data objects before adding them to the model. This means Model.cloneDeep doesn't need to be called
on the arrays passed in,
as the merge methods will make the necessary calls.
-
Fixed `go-module.js` to work when treated as an ES6 module in Node.js.
At the same time we have added `go.mjs` and `go-debug.mjs` as copies of `go-module.js` and `go-debug-module.js`.
For compatibility the kit will contain both sets of files.
-
Fixed automatically performing layouts of outer groups after inner nested groups changed size.
Changes for 2.1.21
-
Added the Swim Lane Layout extension,
demonstrated in the Swim Lane Layout sample.
This layout is a version of LayeredDigraphLayout that positions each node in the lane in which it is supposed
to be.
-
Fixed parts that have their location or position set when not in the Diagram.
This issue affected temporary parts, such as Adornments created by Tools that were repeatedly added and removed from
the Diagram.
-
Fixed ordering of links on a Spot,TopSide or Spot,BottomSide port when linking with a node to the
right.
-
Fixed some scaling animations when Diagram.autoScale is set.
Changes for 2.1.20
-
Fixed GraphLinksModel.setLabelKeysForLinkData sometimes disassociating a link's label nodes that existed in
both the old and new array.
-
Fixed the recording of model changes bound to a Part's
position
or location
, where they
may not have been recorded
in the UndoManager when modifying the position
, location
, or desiredSize
.
This also fixes a regression from 2.1.14.
-
Fixed LinearGradient painting when used as a Shape.stroke.
This drawing issue was most apparent when the Shape's geometry was one-dimensional.
-
Fixed warning messages in Chrome about passive touch event listeners.
-
Fixed JumpOver and AvoidsNodes issues where ongoing animations might stop them from updating.
Changes for 2.1.19
Changes for 2.1.18
Changes for 2.1.17
Changes for 2.1.16
-
Added the Animated Focus sample,
which demonstrates how to scroll to a node and really make it obvious where the node is
and what it looks like.
-
Added the Add To Palette sample,
which allows the user to add items from the palette by selecting a node,
customizing it, and then executing a command to copy it to the palette's model.
The user can also remove selected items from the palette via a command,
even though Palette.isReadOnly is true.
-
Fixed Diagram.makeImage when a Picture has an SVG source that has a different size than its viewbox.
In some browsers the SVGs had been drawn with the incorrect aspect ratio.
-
Fixed Diagram.delayInitialization incorrectly resetting the Diagram.position when animation is
enabled.
Changes for 2.1.15
Changes for 2.1.14
-
Added the Simple Block Editor sample,
demonstrating how to let users easily build block diagrams.
-
Changing Link.fromShortLength or Link.toShortLength no longer invalidates the link's route.
-
Improved the corner curves of orthogonal links when needing to make consecutive turns within double the corner
radius.
-
Fixed an incorrect optimization introduced in 2.1.13 updating initial scrollbars when animating.
-
Fixed undo and redo of ResizingTool operations when the Part.locationSpot is not TopLeft.
Changes for 2.1.13
-
Fixed the cursor shown during a drag in an Overview if some external HTML element changed the cursor.
-
Fixed Diagram.makeSvg when rendering a fill or a stroke that is translucent not to make the opacity too
small.
-
Added wait spinners to three of the "Virtualized" samples:
Virtualized,
VirtualizedForceDirectedLayout,
VirtualizedTreeLayout.
These use an image rotated using CSS animation that is positioned in front of the Diagram.
Changes for 2.1.12
Changes for 2.1.11
-
Fixed "Grid" Panels to ignore the order of shapes in the panel when considering whether a larger
Shape.interval
shape should suppress a smaller interval shape, or should be suppressed by a larger interval shape.
Changed "Grid" Panels to allow multiple shapes with the same Shape.interval to be drawn in the same
orientation
(horizontal or vertical).
-
Fixed documentation by undocumenting the useless AnimationManager.animationReasons property that was
accidentally documented.
See the updated documentation for AnimationManager.canStart.
-
Fixed Brush.isDark sometimes using an incorrect ordering of Brush.colorStops
when determining darkness near the middle of a Brush.
Changes for 2.1.10
Changes for 2.1.9
Changes for 2.1.8
Changes for 2.1.7
-
Added the Packed Hierarchy sample,
which demonstrates a custom PackedLayout for nested circular groups.
-
Added an optional argument to Diagram.clearSelection, and allowed that method to be overridden.
-
The TextEditingTool now only allows one active text editor globally, instead of one per Diagram.
This avoids some focus problems in various browsers.
Changes for 2.1.6
-
The
release/go-module.js
file now exports every class, so that you can import only specific classes,
instead of go
.
For example: import { Diagram, Node, Link, Point, Shape, TextBlock } from ...
.
-
Added a sample demonstrating generating a PDF file for a Diagram, in the
projects/pdf
subdirectory.
The sample is at minimalPDF.
-
Fixed AnimationTriggers erroneously starting when dragging and dropping Parts from another Diagram or
Palette.
-
Fixed LinkingTool not deselecting other parts when a new link is created.
Changes for 2.1.5
Changes for 2.1.4
Changes for 2.1.3
-
Fixed a regression from 2.0.0 with AvoidsNodes links improperly re-routing when using the DraggingTool.
-
Fixed a undo (redo) bug with AnimationTriggers that used location or position on Parts.
-
Improved routing of duplicate links that have Link.adjusting set to a value other than None and have
more than the standard number of points in their route.
Changes for 2.1.2
Changes for 2.1.1
-
Fixed updating of Adornments when there are Bindings from Model.modelData
and that shared object has been modified by calling Model.set.
-
Improved performance when replacing Diagram.model when cleaning up the old model,
which had infrequently resulted in obscure warnings in debug mode about Node.isTreeLeaf.
-
Fixes for loading Models with serialized EnumValues.
-
Performance improvements for concurrent animations.
-
Fixes for consistency of animation state.
This includes modifying when
AnimationStarting
and InitialAnimationStarting
are
called,
and fixes when default animations are stopped and another is immediately started, such as when loading a new
model in the middle of animation.
-
Fixed Model.fromJson loading models with serialized EnumValues.
-
Improved showing non-default cursors when dragging between diagrams.
-
Fixed the operation of Diagram.handlesDragDropForTopLevelParts when dragging on the elements of a
Group.
-
Fixed Diagram.scrollHorizontalLineChange and Diagram.scrollVerticalLineChange would
not affect scrolling size in some browsers.
-
Fixed AvoidsNodes Links routing in nested groups.
Changes for 2.0 are here.
Changes for 1.* are here.