JointJS+ Changelog v4.3.1
JointJS+ 4.3.1 ships with @joint/core 4.3.1 and @joint/react 4.3.2.
routers
rightAngle
routers.rightAngle – fix to allow zero-value margins and un-clamp minPathMargin
Fix an issue where margin, sourceMargin, and targetMargin set to 0 were silently replaced by their defaults (20, or the value of margin). A zero-value margin is now honoured, so a link can be routed flush against the element boundary.
The minPathMargin option is no longer clamped to the smaller of itself and the side margin. The value you pass is now used as-is when the router decides whether to route through the gap between two elements or to detour around it.
ui
Stencil
ui.Stencil – fix to render the drag clone in the browser top layer
Fix an issue where the clone dragged out of the stencil could be covered by other content on the host page (for example a sidebar with a higher z-index, or a container that creates its own stacking context).
When no custom container option is set, the drag paper is now promoted to the browser top layer via the Popover API, so no stacking context of the host page can obscure it. A custom container keeps the previous behaviour, since it implies you want the clone positioned (and possibly clipped) inside that container. Browsers without Popover API support fall back to the previous rendering.
format
Visio
format.Visio – fix filter scaling for imported Visio content
Fix an issue where SVG filters (for example shadows) generated for imported Visio shapes were defined with filterUnits="userSpaceOnUse" and therefore did not scale with the shape. Filters now use the default objectBoundingBox units, so they are scaled correctly regardless of the shape size.
shapes
vsm
shapes.vsm – fix type of VSMWorkcell and VSMProductionBatchKanban
Fix the type attribute of the VSMWorkcell and VSMProductionBatchKanban shapes, which was set to 'VSMCustomerSupplier' and 'VSMProductionKanban' respectively. A diagram containing these shapes is now correctly restored from JSON via graph.fromJSON().
shapes.vsm – fix to prevent an error when rendering zero-length ElectronicInformationFlow links
Fix an issue where an ElectronicInformationFlow link whose source and target were at the same position threw an error while rendering.
graphUtils
graphUtils – export types used in the @joint/plus namespace
The ConstructTreeNode, ConstructTreeConfig, ShortestPathOptions, and AdjacencyList types are now exported from the graphUtils namespace, and the ComputedStylesCopyOptions and UseComputedStylesOption types are exported from the format namespace. They were previously referenced by the public type declarations without being importable.
react
<Paper />
<Paper /> – fix the visual grid to redraw reactively when grid props change
Fix an issue where changing the drawGrid, drawGridSize, or gridSize props after the paper was created did not redraw the visual grid. Grid options set through the options escape hatch are now picked up as well. The grid is redrawn only when one of these values actually changes, not on unrelated re-renders.
Hooks
useCreateFeature – fix duplicate paper feature registration under React 18 StrictMode
Fix an issue where, under React 18 StrictMode, paper features (such as selection or drag interactions) were registered twice, which caused interactions to fire twice.
useCells – fix ghost cells reported after resetCells()
Fix an issue where useCells() kept reporting cells that had been removed from the graph by graph.resetCells().
Other changes
Separate ESM distribution for add-on packages
The @joint/format-visio, @joint/format-bpmn-import, @joint/format-bpmn-export, and @joint/shapes-vsm packages are now distributed as separate ESM files. This prevents bundlers from pulling in a second copy of @joint/core alongside the one used by @joint/plus, which could lead to instanceof checks failing and events not being delivered.
exports and main configuration for all distributed packages
All distributed JointJS+ packages now declare exports and main fields in their package.json, so that both ESM and CommonJS consumers resolve the correct entry points and type declarations.