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:
This was generated with the following code:
import {
AbsoluteLayout,
newInstance,
AnchorLocations,
BlankEndpoint,
StateMachineConnector,
GeneratedGridBackground,
BackgroundPlugin
} from "@jsplumbtoolkit/browser-ui"
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 toOrthogonalConnectorOptions
. 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.
Get in touch!
If you'd like to discuss any of the ideas/concepts in this article we'd love to hear from you - drop us a line at hello@jsplumbtoolkit.com.
Not a user of the jsPlumb Toolkit but thinking of checking it out? Head over to https://jsplumbtoolkit.com/trial. It's a good time to get started with jsPlumb.