fix: Fix for cells not removed (#115)
There was a logical error in processing `ChildChange` in `Graph`. When cell was removed, `ChildChange` created to change parent of removed cell to `null`. But in code, if parent is null, code to destroy child cell state was not called, so cell stayed rendered on canvas. The fix add a check for "falsy" parent, so correct branch of code is executed and cells are destroyed.development
parent
7e9bc662be
commit
a3b5a60c60
|
@ -591,8 +591,7 @@ class Graph extends EventSource {
|
|||
this.view.invalidate(change.child, true, true);
|
||||
|
||||
if (
|
||||
newParent &&
|
||||
(!this.getDataModel().contains(newParent) || newParent.isCollapsed())
|
||||
!newParent || !this.getDataModel().contains(newParent) || newParent.isCollapsed()
|
||||
) {
|
||||
this.view.invalidate(change.child, true, true);
|
||||
this.removeStateForCell(change.child);
|
||||
|
|
Loading…
Reference in New Issue