CHANGELOG
- add Sequence Diagram demo
- add HTML Elements demo
- upgrade jQuery dependency (
~3.5.0
) - dia.Paper - add
beforeRender
andafterRender
options, addhasScheduledUpdates()
, triggerrender:done
in sync mode - dia.Paper - fix missing initial
render:done
event - dia.Paper - prevent the prototype options modification, persist functions passed as options
details
new joint.dia.Paper({
// e.g. fixes `defaultConnector` option defined as a function
defaultConnector: (sourcePoint, targetPoint, route) => {
const polyline = new g.Polyline([sourcePoint, ...route, targetPoint]);
return `M ${polyline.serialize()}`;
}
});
- dia.Paper -
scaleContentToFit()
optionpadding
accepts an object
details
paper.scaleContentToFit({ padding: { top: 50, bottom: 10, horizontal: 10 }});
- dia.Paper - fix
isMounted
argument ofviewport()
option
details
new joint.dia.Paper({
viewport: function(view, isMounted) {
if (isMounted) {
// the view was already mounted
// it's visible in the paper
} else {
// the view was just created or was detached by this function in the previous run
// it's not visible in the paper (it's not in the DOM)
}
// return `true` to mount the view
// return `false` to detach the view
}
});
- dia.Paper - dynamic link update priorities (fix for "link connected to other two links" update bug)
- dia.Element - port removal runs in batch
- dia.Element - add
getGroupPorts()
- dia.Element - prevent exception in
getPointFromConnectedLink()
when port does not exist - dia.LinkView - fix never ending batch for legacy link tools
- dia.LinkView - add
requestConnectionUpdate()
- dia.LinkView - trigger
link:snap:connect
andlink:snap:disconnect
events
- dia.LinkView - prevent exception when labels and connection require update
- dia.LinkView - measure snap distance for links from magnet's boundary
- dia.LinkView - add
getEndConnectionPoint()
- mvc.View - add
DETACHABLE
property to ignore viewport matching,FLAG_INSERT
&FLAG_REMOVE
defined on per view basis - linkTools.Anchor: add
resetAnchor
option - linkTools.Segments: add
stopPropagation
option - connectionPoints.anchor - add
align
andalignOffset
options - attributes.textWrap: add
maxLineCount
option - util.breakText - retain new line characters, add
maxLineCount
option - util.sanitizeHTML: sanitize attribute values with "data:" and "vbscript:"
- Geometry - add
parallel()
to Line, addserialize()
to Point and Line