Skip to main content

Toolkit release 5.10.8

· 2 min read
Simon Porritt

Today we released version 5.10.8 of the Toolkit edition of jsPlumb. In fact we're released a few versions in rapid succession as we've honed the API for a new piece of functionality: generated grid backgrounds.

We're excited to have added this functionality to the Toolkit - it provides a polish to applications using the Toolkit with an extremely easy to use API. The backgrounds themselves consist of a single SVG element with a repeated pattern, and so are very performant.

The full documentation for generated grid backgrounds can be found here.

But here's a quick example:

Grid background

This was generated with the following code:

import { GeneratedGridBackground, BackgroundPlugin } from "@jsplumbtoolkit/browser-ui-plugin-background"import { newInstance } from "@jsplumbtoolkit/browser-ui-vanilla-2"import { AbsoluteLayout } from "@jsplumbtoolkit/core"import { AnchorLocations, BlankEndpoint } from "@jsplumb/core"import { StateMachineConnector} from "@jsplumb/connector-bezier"
const tk = newInstance()const surface = tk.render(someElement, {        layout:{        type:AbsoluteLayout.type    },    defaults:{        anchor:AnchorLocations.Continuous,        endpoint:BlankEndpoint.type,        connector:StateMachineConnector.type    },        plugins:[        {            type:BackgroundPlugin.type,            options:{                type:GeneratedGridBackground.type,                minWidth:1500,                minHeight:1500            }        }            ]})

Changelog#

The changelog for versions 5.10.6 through 5.10.8 is:

5.10.8#

August 16th 2022

  • Internal refactoring of background plugin to expose type members that can be used when configuring backgrounds in an ES6/TS development environment, to avoid the code being omitted through tree shaking.

5.10.7#

August 15th 2022

  • Added support for generated grid backgrounds.

5.10.6#

August 12th 2022

  • Fixed a couple of issues with edge placement in nested nodes/groups in the underlying community edition
  • Fixed an issue with the tiled background layer in the background plugin that was preventing it from rendering.
  • Reinstated the zoomToBackground method on the Surface widget
  • Added supportLegacyConnectorData flag to OrthogonalConnectorOptions. This offers a means for people migrating from 2.x to load datasets where there is path data for Orthogonal connectors in the 2.x format.