ninegrid2 6.830.0 → 6.832.0
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/dist/bundle.cjs.js +5 -9
- package/dist/bundle.esm.js +5 -9
- package/dist/nx/nxSplitter.js +5 -9
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +5 -9
package/dist/bundle.cjs.js
CHANGED
|
@@ -121190,11 +121190,8 @@ class nxSplitter extends HTMLElement {
|
|
|
121190
121190
|
pointerEvents: "none"
|
|
121191
121191
|
});
|
|
121192
121192
|
|
|
121193
|
-
const root = this.getRootNode();
|
|
121194
|
-
const parent =
|
|
121195
|
-
root instanceof ShadowRoot ? root.host :
|
|
121196
|
-
this.parentElement || document.body; // fallback 처리까지 포함
|
|
121197
|
-
|
|
121193
|
+
const root = this.getRootNode({ composed: true });
|
|
121194
|
+
const parent = root instanceof ShadowRoot ? root.host : this.parentElement || document.body;
|
|
121198
121195
|
|
|
121199
121196
|
//const parent = this.getRootNode().host || this.parentElement;
|
|
121200
121197
|
const prev = this.previousElementSibling;
|
|
@@ -121209,6 +121206,8 @@ class nxSplitter extends HTMLElement {
|
|
|
121209
121206
|
const left = e.clientX - parentRect.left;
|
|
121210
121207
|
const top = e.clientY - parentRect.top;
|
|
121211
121208
|
|
|
121209
|
+
console.log(left, top);
|
|
121210
|
+
|
|
121212
121211
|
// 방향별 위치 설정
|
|
121213
121212
|
if (this.#mode === "h") {
|
|
121214
121213
|
dragBar.style.top = "0";
|
|
@@ -121222,12 +121221,9 @@ class nxSplitter extends HTMLElement {
|
|
|
121222
121221
|
dragBar.style.width = "100%";
|
|
121223
121222
|
}
|
|
121224
121223
|
|
|
121225
|
-
console.log(parent);
|
|
121226
|
-
|
|
121227
121224
|
// 👇 부모 노드 기준으로 삽입
|
|
121228
121225
|
(parent.shadowRoot || parent).appendChild(dragBar);
|
|
121229
121226
|
|
|
121230
|
-
|
|
121231
121227
|
const min = this.#mode === "h" ? prevRect.left : prevRect.top;
|
|
121232
121228
|
const max = this.#mode === "h" ? nextRect.right : nextRect.bottom;
|
|
121233
121229
|
|
|
@@ -121250,7 +121246,7 @@ class nxSplitter extends HTMLElement {
|
|
|
121250
121246
|
|
|
121251
121247
|
window.removeEventListener("mousemove", onMove);
|
|
121252
121248
|
window.removeEventListener("mouseup", onUp);
|
|
121253
|
-
|
|
121249
|
+
dragBar.remove();
|
|
121254
121250
|
|
|
121255
121251
|
|
|
121256
121252
|
// 기준: prev + next 너비 합계
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121186,11 +121186,8 @@ class nxSplitter extends HTMLElement {
|
|
|
121186
121186
|
pointerEvents: "none"
|
|
121187
121187
|
});
|
|
121188
121188
|
|
|
121189
|
-
const root = this.getRootNode();
|
|
121190
|
-
const parent =
|
|
121191
|
-
root instanceof ShadowRoot ? root.host :
|
|
121192
|
-
this.parentElement || document.body; // fallback 처리까지 포함
|
|
121193
|
-
|
|
121189
|
+
const root = this.getRootNode({ composed: true });
|
|
121190
|
+
const parent = root instanceof ShadowRoot ? root.host : this.parentElement || document.body;
|
|
121194
121191
|
|
|
121195
121192
|
//const parent = this.getRootNode().host || this.parentElement;
|
|
121196
121193
|
const prev = this.previousElementSibling;
|
|
@@ -121205,6 +121202,8 @@ class nxSplitter extends HTMLElement {
|
|
|
121205
121202
|
const left = e.clientX - parentRect.left;
|
|
121206
121203
|
const top = e.clientY - parentRect.top;
|
|
121207
121204
|
|
|
121205
|
+
console.log(left, top);
|
|
121206
|
+
|
|
121208
121207
|
// 방향별 위치 설정
|
|
121209
121208
|
if (this.#mode === "h") {
|
|
121210
121209
|
dragBar.style.top = "0";
|
|
@@ -121218,12 +121217,9 @@ class nxSplitter extends HTMLElement {
|
|
|
121218
121217
|
dragBar.style.width = "100%";
|
|
121219
121218
|
}
|
|
121220
121219
|
|
|
121221
|
-
console.log(parent);
|
|
121222
|
-
|
|
121223
121220
|
// 👇 부모 노드 기준으로 삽입
|
|
121224
121221
|
(parent.shadowRoot || parent).appendChild(dragBar);
|
|
121225
121222
|
|
|
121226
|
-
|
|
121227
121223
|
const min = this.#mode === "h" ? prevRect.left : prevRect.top;
|
|
121228
121224
|
const max = this.#mode === "h" ? nextRect.right : nextRect.bottom;
|
|
121229
121225
|
|
|
@@ -121246,7 +121242,7 @@ class nxSplitter extends HTMLElement {
|
|
|
121246
121242
|
|
|
121247
121243
|
window.removeEventListener("mousemove", onMove);
|
|
121248
121244
|
window.removeEventListener("mouseup", onUp);
|
|
121249
|
-
|
|
121245
|
+
dragBar.remove();
|
|
121250
121246
|
|
|
121251
121247
|
|
|
121252
121248
|
// 기준: prev + next 너비 합계
|
package/dist/nx/nxSplitter.js
CHANGED
|
@@ -45,11 +45,8 @@ class nxSplitter extends HTMLElement {
|
|
|
45
45
|
pointerEvents: "none"
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
-
const root = this.getRootNode();
|
|
49
|
-
const parent =
|
|
50
|
-
root instanceof ShadowRoot ? root.host :
|
|
51
|
-
this.parentElement || document.body; // fallback 처리까지 포함
|
|
52
|
-
|
|
48
|
+
const root = this.getRootNode({ composed: true });
|
|
49
|
+
const parent = root instanceof ShadowRoot ? root.host : this.parentElement || document.body;
|
|
53
50
|
|
|
54
51
|
//const parent = this.getRootNode().host || this.parentElement;
|
|
55
52
|
const prev = this.previousElementSibling;
|
|
@@ -64,6 +61,8 @@ class nxSplitter extends HTMLElement {
|
|
|
64
61
|
const left = e.clientX - parentRect.left;
|
|
65
62
|
const top = e.clientY - parentRect.top;
|
|
66
63
|
|
|
64
|
+
console.log(left, top);
|
|
65
|
+
|
|
67
66
|
// 방향별 위치 설정
|
|
68
67
|
if (this.#mode === "h") {
|
|
69
68
|
dragBar.style.top = "0";
|
|
@@ -77,12 +76,9 @@ class nxSplitter extends HTMLElement {
|
|
|
77
76
|
dragBar.style.width = "100%";
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
console.log(parent);
|
|
81
|
-
|
|
82
79
|
// 👇 부모 노드 기준으로 삽입
|
|
83
80
|
(parent.shadowRoot || parent).appendChild(dragBar);
|
|
84
81
|
|
|
85
|
-
|
|
86
82
|
const min = this.#mode === "h" ? prevRect.left : prevRect.top;
|
|
87
83
|
const max = this.#mode === "h" ? nextRect.right : nextRect.bottom;
|
|
88
84
|
|
|
@@ -105,7 +101,7 @@ class nxSplitter extends HTMLElement {
|
|
|
105
101
|
|
|
106
102
|
window.removeEventListener("mousemove", onMove);
|
|
107
103
|
window.removeEventListener("mouseup", onUp);
|
|
108
|
-
|
|
104
|
+
dragBar.remove();
|
|
109
105
|
|
|
110
106
|
|
|
111
107
|
// 기준: prev + next 너비 합계
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -45,11 +45,8 @@ class nxSplitter extends HTMLElement {
|
|
|
45
45
|
pointerEvents: "none"
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
-
const root = this.getRootNode();
|
|
49
|
-
const parent =
|
|
50
|
-
root instanceof ShadowRoot ? root.host :
|
|
51
|
-
this.parentElement || document.body; // fallback 처리까지 포함
|
|
52
|
-
|
|
48
|
+
const root = this.getRootNode({ composed: true });
|
|
49
|
+
const parent = root instanceof ShadowRoot ? root.host : this.parentElement || document.body;
|
|
53
50
|
|
|
54
51
|
//const parent = this.getRootNode().host || this.parentElement;
|
|
55
52
|
const prev = this.previousElementSibling;
|
|
@@ -64,6 +61,8 @@ class nxSplitter extends HTMLElement {
|
|
|
64
61
|
const left = e.clientX - parentRect.left;
|
|
65
62
|
const top = e.clientY - parentRect.top;
|
|
66
63
|
|
|
64
|
+
console.log(left, top);
|
|
65
|
+
|
|
67
66
|
// 방향별 위치 설정
|
|
68
67
|
if (this.#mode === "h") {
|
|
69
68
|
dragBar.style.top = "0";
|
|
@@ -77,12 +76,9 @@ class nxSplitter extends HTMLElement {
|
|
|
77
76
|
dragBar.style.width = "100%";
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
console.log(parent);
|
|
81
|
-
|
|
82
79
|
// 👇 부모 노드 기준으로 삽입
|
|
83
80
|
(parent.shadowRoot || parent).appendChild(dragBar);
|
|
84
81
|
|
|
85
|
-
|
|
86
82
|
const min = this.#mode === "h" ? prevRect.left : prevRect.top;
|
|
87
83
|
const max = this.#mode === "h" ? nextRect.right : nextRect.bottom;
|
|
88
84
|
|
|
@@ -105,7 +101,7 @@ class nxSplitter extends HTMLElement {
|
|
|
105
101
|
|
|
106
102
|
window.removeEventListener("mousemove", onMove);
|
|
107
103
|
window.removeEventListener("mouseup", onUp);
|
|
108
|
-
|
|
104
|
+
dragBar.remove();
|
|
109
105
|
|
|
110
106
|
|
|
111
107
|
// 기준: prev + next 너비 합계
|