@krainovsd/graph 0.10.0-rc4 → 0.10.0-rc5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.cjs
CHANGED
|
@@ -3162,11 +3162,19 @@ class GraphCanvas {
|
|
|
3162
3162
|
if (this.area)
|
|
3163
3163
|
this.areaRect = this.area.getBoundingClientRect();
|
|
3164
3164
|
}
|
|
3165
|
-
clearCache() {
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3165
|
+
clearCache(keys) {
|
|
3166
|
+
if (!keys) {
|
|
3167
|
+
this.nodeOptionsCache = {};
|
|
3168
|
+
this.linkOptionsCache = {};
|
|
3169
|
+
this.cachedNodeText = {};
|
|
3170
|
+
this.cachedTextNodeParameters = {};
|
|
3171
|
+
}
|
|
3172
|
+
else {
|
|
3173
|
+
for (let i = 0; i < keys.length; i++) {
|
|
3174
|
+
const key = keys[i];
|
|
3175
|
+
this[key] = {};
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3170
3178
|
}
|
|
3171
3179
|
tick() {
|
|
3172
3180
|
if (!this.simulationWorking && !this.highlightWorking)
|