- Renamed
selection.set
toselection.attrs
. - When using
attrs
, most attribute endpoints can take the formvalue
or{ value, duration, ease, ... }
. - When using
attrs
, direct entries can also be functions.
canvas.edges([[1, 2], [2, 3]]).attrs({
color: {
value: "red",
animtype: "traverse",
duration: 1.2,
},
labels: ([s, t]) => ({
0: { text: someData[s][t] },
})
}
- Merged
CanvasSelection
andClient
into a singleCanvas
class. - Redesigned the event format.
- Initial attributes can be provided to
element.add
. - Changed
edge.traverse(source?).color()
toedge.traverse(color, source?)
. - Added a generic data parameter to all selections, to improve type hints.
- Renamed
eventQ
towithQ
. - Added a dedicated
QueueSelection
, accessible throughcanvas.queue
andcanvas.queues
. - Renamed
queue.cancel
toqueue.clear
. - Replaced
client.listen
/client.receive
withcanvas.dispatch
/canvas.ondispatch
/canvas.receive
/canvas.onreceive
. - Renamed
canvas.broadcast
/canvas.listen
tocanvas.message
/canvas.onmessage
. - Removed
canvas.callback
, use explicit messages instead. - Split
canvas.edgelengths
intocanvas.edgelayout
andcanvas.edgelength
. - Renamed
canvas.zoomkey
tocanvas.zoomtoggle
. - Renamed
node.click
/node.hover
tonode.onclick
/node.onhoverin
/node.onhoverout
. - All default IDs are now 0 (e.g. node value label, edge weight label, default event queue).
- Edges with IDs in the form "source-target(-ID)" automatically initialise their source and target.
- For undirected edges, IDs in the form "source-target(-ID)" will try to match "target-source(-ID)".
- For directed edges, (source, target) and (target, source) are now different.