GoJS version 1.5.0

I’m pleased to announce that version 1.5.0 is now the latest release of GoJS, with many new samples and features.

If I counted correctly, there are 33 new samples, most of which you can see at http://gojs.net/latest/samples. The Change Log lists all of the new samples.

Some of the new samples are in the http://gojs.net/latest/extensions directory, demonstrating new classes that are defined there. Those extension classes are designed to be reused in your application – just load the JS file.

Many of the old samples have been improved, including bug fixes. If you based your app on a GoJS sample, you might want to consider seeing if there were any changes. Some samples, such as BPMN, http://gojs.net/latest/extensions/BPMN.html, have had code cleanups and lots of new features.

Buttons are now styled to be flatter and more rectangular. If you are curious about how the predefined Buttons are now defined, you can see their definitions in http://gojs.net/latest/extensions/Buttons.js.

There are now Diagram methods for doing “query-by-example”, such as Diagram.findNodesByExample.

You can let the user scroll or pan the diagram infinitely far by setting Diagram.scrollMode. You can now limit the specific values that a Diagram may be scrolled to or zoomed to by supplying functions that return the permitted values: Diagram.positionComputation and Diagram.scaleComputation.

You can now define your own custom named Shape figures and arrowheads by calling the static methods Shape.defineFigureGenerator and Shape.defineArrowheadGeometry.

You can now define your own named kinds of Panel or GraphObject, just as “Button”, “TreeExpanderButton”, “SubGraphExpanderButton”, “ContextMenuButton”, and “PanelExpanderButton” (new!) are now defined in Buttons.js. Those definitions make use of the new static method GraphObject.defineBuilder.

We have now documented the Picture.sourceCrossOrigin property, whose value may be a function that you can use to customize cross-origin requests for Images.

I sometimes had bugs in my apps because I forgot to make sure that Arrays of Objects in my model node data were copied when the node was copied. Although implementing a Model.copyNodeDataFunction still works, you can now set Model.copiesArrays and Model.copiesArrayObjects to true to accomplish the same results.

You can now use Placeholders in tooltip and context menu Adornments in order to determine the positioning of those Adornments.

Read about these and all of the other improvements in GoJS at http://gojs.net/latest and the Change Log.