- Added ChangedEvent argument to onModelChange event handler.
- Updated dependencies and copyright date.
- Fixed a regression from 1.1.0 that prevented onModelChange from being called for an initial data merge.
- Added an optional style property to allow the rendered div to be styled with CSS properties like borders, backgrounds, etc.
- ReactDiagram.skipsDiagramUpdate is now an optional prop. We still encourage using it in most cases.
- Added clear method to allow clearing of the diagram and treating the next state update as a Diagram reinitialization.
- Model data is now merged into the GoJS model before node and link data in case any ofModel bindings depend upon it.
- ReactDiagram.onModelChange is now an optional prop. If not provided, GoJS's Model.toIncrementalData will not be called. This is useful for read-only/immutable diagrams or diagrams where state changes need not be propagated back to the app.
- Node and link data arrays are no longer deep cloned prior to calling the merge methods as the merge methods now clone any new data as necessary.
- The GoJS model change listener is now active during model initialization and any merges of data. This means all changes that take place in GoJS - including side effects like laying out newly added nodes - will call the onModelChange handler. Make sure to set skipsDiagramUpdate to true when making state updates in that handler.