clientIO / joint

A proven SVG-based JavaScript diagramming library powering exceptional UIs
https://jointjs.com
Mozilla Public License 2.0
4.73k stars 853 forks source link

fix(dia.Graph): remove graph reference from cells after resetCells() #2692

Closed kumilingus closed 5 months ago

kumilingus commented 5 months ago

Description

Make sure the graph reference is removed from the cells after resetCells() call.

const el = new shapes.standard.Rectangle();

graph.addCell(el);
assert.ok(el.graph === graph);

graph.resetCells([]); // now removes the `graph` references
assert.ok(!el.graph);