Skip to main content

JointJS+ changelog v3.7.2

Add separate bundle files for each theme and base CSS to distributed package

In addition to base CSS (which takes care of the layout of plugins) JointJS provides four built-in CSS themes (which provide visual styling). However, there was previously no way to unbundle these themes from the base CSS if they were not needed by your application.

We recognized this as an opportunity for optimization - if your application does not use any of the themes, for example, this change provides a way to reduce the footprint of JointJS in your application with very little effort. That being said, the existing rappid.css file (which contains the base CSS and all themes) has been left unchanged too, so you can continue using it if you wish.

Details...

Separate bundled files were added for the base CSS of JointJS, and for each built-in theme. You can find the new files in the dist folder of your JointJS+ package - rappid.base.css, and rappid.theme._.css (where _ stands for the names of JointJS built-in themes: dark, default, material and modern), along with their minified versions.

For example, if you are currently using the build/package/rappid.min.css file as follows...

<link
rel="stylesheet"
type="text/css"
href="./JointJSPlus/build/package/rappid.min.css"
/>

...you can switch to the a combination of base CSS + modern theme like this:

<link
rel="stylesheet"
type="text/css"
href="./JointJSPlus/dist/rappid.base.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="./JointJSPlus/dist/rappid.theme.modern.min.css"
/>

In BPMNEditor application, add dataObject BPMN shape to stencil, enable touchpad zoom and pan

The dataObject BPMN shape was added to the stencil of the BPMNEditor application:

BPMNEditor application

Additionally, using touchpad for zooming and panning was enabled for the application (by adding listeners for the paper:pinch and paper:pan JointJS events).

Live BPMNEditor Demo


In OrgChart application, fix shapes namespacing

Previously, the cellNamespace and cellViewNamespace properties weren't properly configured in the application. We have fixed the code to be in line with JointJS best practices.

Live OrgChart Demo


dia.CommandManager - fix undo after adding Cells with hierarchical relationship

This change fixes an issue in CommandManager when embedded Elements were added to the Graph in a certain order (parents first, then children).

In that case, the undo action explicitly removed the parent first (which caused its children to be removed implicitly), and then it tried to explicitly remove the children, which threw an error - because the children have already been removed.


ui.Inspector - fix unsetProperty() method so that it uses Cell.removeProp()

Details...

This fix removes a bug stemming from duplicate code - the Cell.removeProp() function is a newer function which provides the same functionality at a more logical location, and which properly re-renders the CellView for attrs changes.


ui.Inspector - fix to throw an error when encountering an expression using an unregistered custom primitive operator

It is possible to define custom operators for use in Inspector expressions. Crucially, all of these extra operators must be defined in the operators object during the instantiation of the Inspector.

Previously, if an unknown operator were encountered by the expression-evaluation algorithm, it would fail with a difficult-to-debug error. Instead, the algorithm now explicitly checks the list of built-in primitive and composite operators and the list of registered custom operators (as defined in the operators object) for each expression encountered. If an operator cannot be found in either of these lists, an error providing its name is thrown.


ui.Navigator - fix error occurring after a scroll event when the Navigator is not rendered

Previously, scrolling a PaperScroller while having a Navigator component defined - but not rendered - caused an error to be thrown. The issue has been resolved for this version by fixing the Navigator component's PaperScroller listener.


ui.PaperScroller - fix to set panning inertia velocity at zero on drag start

There was an error in our implementation of inertia for the PaperScroller component - on drag start, a nonzero inertia velocity was introduced, which was a problem if drag end was then triggered immediately afterward without any intervening drag movement (e.g. when using the tap gesture). This caused the incorrect value of inertia velocity to be used, introducing movement when none was expected. The inertia implementation was fixed in this version to prevent this issue.


ui.Selection - fix to trigger selection-box events when Paper is not interactive

This fix ensures that selection-box events are triggered even when there are no allowed interactions with Selection box or active elements. In addition, the fix prevents triggering solo action:pointerup event when selecting and translating in this situation.


ui.Selection - fix to prevent dragging the selection while the user interacts with other Cells

This fix prevents an issue where starting to drag a non-selected Element when a Selection is present on a Paper caused the Selection to be dragged (instead of the Element).


ui.Stencil - fix groups option inheritance, fix non-uniform behavior of layout callback

This is a collection of fixes for making the behavior of Stencil groups more consistent:

  • The Graph sent to the layout callback function always has the group property set. This was previously only the case at initialization, but now it is also done when filtering the Graph.
  • Each group's specific paperOptions are taken into account during Graph creation (as is the case for all other attributes).
  • The filter() function no longer throws an error when no search is defined (''). Instead, it hides all Elements (equivalent to setting the search to {}).

layout.PortLabel - fix passing of label.position.args.attrs in inside, outside, radial layouts

There was a bug in the implementation of several PortLabel functions ('inside', 'insideOriented', 'outside', 'outsideOriented', 'radial', 'radialOriented'), which caused them to ignore values provided in label.position.args.attrs. This change makes sure that these values are correctly propagated for all PortLabel layout functions, such that all calculated attributes can be overridden manually.


connectors.jumpover - fix to prevent stacked links from causing jumps

Previously, the jumpover connector was treating overlapping links as having an intersection, which caused it to draw jumps where they were not expected. We have added additional logic to the algorithm to prevent this behavior.

Before fixAfter fix
Before fixAfter fix

util.breakText - fix to prevent NO_SPACE characters from appearing in the result

Details...

When breaking down text, occasionally, an extra NO_SPACE character ('0') was added by the breakText() function. This was a bug - the character is internally used to separate lines, and in certain edge cases (when moving the last character from the previous line to the new line), it was not removed as expected. The function has been fixed to prevent this issue.