Skip to content

Commit 595bc0b

Browse files
committed
fix remove of nodes
1 parent 2a90f58 commit 595bc0b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

lib/js/webcomponent/DockSpawnTsWebcomponent.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/webcomponent/DockSpawnTsWebcomponent.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dock-spawn-ts",
3-
"version": "3.6.0",
3+
"version": "3.6.1",
44
"description": "DockSpawn Typescript Version",
55
"license": "MIT",
66
"author": "[email protected]",

src/webcomponent/DockSpawnTsWebcomponent.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { PanelContainer } from "../PanelContainer.js";
33
import { PanelType } from "../enums/PanelType.js";
44
import { DockNode } from "../DockNode.js";
55
//@ts-ignore
6-
import style1 from "../../../lib/css/dock-manager-style.css" with { type : 'css'}
6+
import style1 from "../../../lib/css/dock-manager-style.css" with { type: 'css'}
77
//@ts-ignore
8-
import style2 from "../../../lib/css/dock-manager.css" with { type : 'css'}
8+
import style2 from "../../../lib/css/dock-manager.css" with { type: 'css'}
99

1010
function toParString(strings: TemplateStringsArray, values: any[]) {
1111
if (strings.length === 1)
@@ -80,12 +80,12 @@ export class DockSpawnTsWebcomponent extends HTMLElement {
8080

8181
this.observer = new MutationObserver((mutations) => {
8282
mutations.forEach((mutation) => {
83-
mutation.addedNodes.forEach((node) => {
84-
this.handleAddedChildNode(node as HTMLElement);
85-
});
8683
mutation.removedNodes.forEach((node) => {
8784
this.handleRemovedChildNode(node as HTMLElement);
8885
});
86+
mutation.addedNodes.forEach((node) => {
87+
this.handleAddedChildNode(node as HTMLElement);
88+
});
8989
});
9090
});
9191
this.observer.observe(this, { childList: true });

0 commit comments

Comments
 (0)