@node-projects/web-component-designer-widgets-wunderbaum 0.1.15 → 0.1.16
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.
|
@@ -19,7 +19,9 @@ export declare class TreeViewExtended extends BaseCustomWebComponentConstructorA
|
|
|
19
19
|
_switchHideAtRunTimeState(img: HTMLImageElement, designItem: IDesignItem): void;
|
|
20
20
|
showDesignItemContextMenu(designItem: IDesignItem, event: MouseEvent): ContextMenu;
|
|
21
21
|
ready(): Promise<void>;
|
|
22
|
-
|
|
22
|
+
_recomputeRunning: any;
|
|
23
|
+
_recomputeRequestedAgain: any;
|
|
24
|
+
createTree(rootItem: IDesignItem): Promise<void>;
|
|
23
25
|
set instanceServiceContainer(value: InstanceServiceContainer);
|
|
24
26
|
selectionChanged(event: ISelectionChangedEvent): void;
|
|
25
27
|
private _recomputeTree;
|
|
@@ -244,9 +244,25 @@ export class TreeViewExtended extends BaseCustomWebComponentConstructorAppend {
|
|
|
244
244
|
},
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
|
-
|
|
247
|
+
_recomputeRunning;
|
|
248
|
+
_recomputeRequestedAgain;
|
|
249
|
+
async createTree(rootItem) {
|
|
248
250
|
if (this._tree) {
|
|
249
|
-
this.
|
|
251
|
+
if (!this._recomputeRunning) {
|
|
252
|
+
this._recomputeRunning = true;
|
|
253
|
+
setTimeout(async () => {
|
|
254
|
+
this._recomputeRequestedAgain = false;
|
|
255
|
+
await this._recomputeTree(rootItem);
|
|
256
|
+
this._recomputeRunning = false;
|
|
257
|
+
if (this._recomputeRequestedAgain) {
|
|
258
|
+
this._recomputeRequestedAgain = false;
|
|
259
|
+
this.createTree(rootItem);
|
|
260
|
+
}
|
|
261
|
+
}, 20);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
this._recomputeRequestedAgain = true;
|
|
265
|
+
}
|
|
250
266
|
}
|
|
251
267
|
}
|
|
252
268
|
set instanceServiceContainer(value) {
|
|
@@ -264,11 +280,11 @@ export class TreeViewExtended extends BaseCustomWebComponentConstructorAppend {
|
|
|
264
280
|
selectionChanged(event) {
|
|
265
281
|
this._highlight(event.selectedElements);
|
|
266
282
|
}
|
|
267
|
-
_recomputeTree(rootItem) {
|
|
283
|
+
async _recomputeTree(rootItem) {
|
|
268
284
|
try {
|
|
269
285
|
this._tree.root.removeChildren();
|
|
270
286
|
this._getChildren(rootItem, null);
|
|
271
|
-
this._tree.expandAll();
|
|
287
|
+
await this._tree.expandAll();
|
|
272
288
|
this._filterNodes();
|
|
273
289
|
}
|
|
274
290
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "web-component-designer addon: Widgets using wunderbaum",
|
|
3
3
|
"name": "@node-projects/web-component-designer-widgets-wunderbaum",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.16",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|