Fix collapse and resize (#121)

This commit is contained in:
Chenlei Hu
2024-09-04 15:45:22 -04:00
committed by GitHub
parent 67f486fff7
commit 99d0de239c
2 changed files with 12 additions and 2 deletions

View File

@@ -2469,6 +2469,11 @@ const globalExport = {};
}
}
// Sync the state of this.resizable.
if (this.pinned) {
this.pin(true);
}
if (this.onConfigure) {
this.onConfigure(info);
}
@@ -4755,8 +4760,12 @@ const globalExport = {};
}
}
get collapsed() {
return !!this.flags.collapsed;
}
get collapsible() {
return !this.pinned && this.constructor.collapsable;
return !this.pinned && (this.constructor.collapsable !== false);
}
/**
@@ -4765,7 +4774,7 @@ const globalExport = {};
**/
collapse(force) {
this.graph._version++;
if (this.collapsible && !force) {
if (!this.collapsible && !force) {
return;
}
if (!this.flags.collapsed) {