GoJS® Change Log
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
Changes for 1.5.16 and 1.5.17
-
In CommonJS environments, set
module.exports
as well as window.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
Changes for 1.5.13
Changes for 1.5.12
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
Changes for 1.5.8
Changes for 1.5.7
Changes for 1.5.6
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
Changes for 1.5.3
Changes for 1.5.2
- Updated the TypeScript definition file, goJS.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:
-
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
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 the image.crossOrigin
. This property will be documented in 1.5.
Changes for 1.4.23
Changes for 1.4.22
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
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
- Fixed hiding Adornments of Links hidden by a connected Node becoming not visible.
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
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
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
and xmlns: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:
-
Diagram and Layer:
-
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:
-
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
, or each
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
Changes for 1.3.5
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 undefined go
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 be null
, was erroneously NaN
).
- 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
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:
-
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:
-
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
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
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
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/GoJS.d.ts
for better type-checking when using TypeScript and for Intellisense support in Visual Studio.
-
Added Extensions of Tool, Layout, and CommandHandler:
-
Samples:
-
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:
-
Links:
-
Added Row and Column separators in Table Panels:
-
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:
-
Layouts:
-
Tools and CommandHandler:
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
Changes for 1.1.10
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
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
Changes for 1.1.3
Changes for 1.1.2
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:
-
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
and requestUpdate
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:
-
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:
-
Layouts:
-
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.
Changes for 1.0.8
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 of x 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
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
Changes for 1.0.2
Changes for 1.0.1