ninegrid2 6.679.0 → 6.680.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 +23 -1
- package/dist/bundle.esm.js +23 -1
- package/dist/nx/nxSplitter.js +23 -1
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +23 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -121117,12 +121117,34 @@ class nxSplitter extends HTMLElement {
|
|
|
121117
121117
|
};
|
|
121118
121118
|
|
|
121119
121119
|
|
|
121120
|
-
const onUp =
|
|
121120
|
+
const onUp = e => {
|
|
121121
121121
|
window.removeEventListener("mousemove", onMove);
|
|
121122
121122
|
window.removeEventListener("mouseup", onUp);
|
|
121123
121123
|
dragBar.remove();
|
|
121124
|
+
|
|
121125
|
+
const parentRect = parent.getBoundingClientRect();
|
|
121126
|
+
|
|
121127
|
+
// 현재 드래그 위치 계산 (부모 기준)
|
|
121128
|
+
const position = (this.#mode === "h")
|
|
121129
|
+
? e.clientX - parentRect.left
|
|
121130
|
+
: e.clientY - parentRect.top;
|
|
121131
|
+
|
|
121132
|
+
// 형제 요소들
|
|
121133
|
+
const prev = this.previousElementSibling;
|
|
121134
|
+
const next = this.nextElementSibling;
|
|
121135
|
+
|
|
121136
|
+
if (!prev || !next) return;
|
|
121137
|
+
|
|
121138
|
+
if (this.#mode === "h") {
|
|
121139
|
+
prev.style.width = `${position}px`;
|
|
121140
|
+
next.style.width = `${parentRect.width - position - this.offsetWidth}px`;
|
|
121141
|
+
} else {
|
|
121142
|
+
prev.style.height = `${position}px`;
|
|
121143
|
+
next.style.height = `${parentRect.height - position - this.offsetHeight}px`;
|
|
121144
|
+
}
|
|
121124
121145
|
};
|
|
121125
121146
|
|
|
121147
|
+
|
|
121126
121148
|
window.addEventListener("mousemove", onMove);
|
|
121127
121149
|
window.addEventListener("mouseup", onUp);
|
|
121128
121150
|
};
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121113,12 +121113,34 @@ class nxSplitter extends HTMLElement {
|
|
|
121113
121113
|
};
|
|
121114
121114
|
|
|
121115
121115
|
|
|
121116
|
-
const onUp =
|
|
121116
|
+
const onUp = e => {
|
|
121117
121117
|
window.removeEventListener("mousemove", onMove);
|
|
121118
121118
|
window.removeEventListener("mouseup", onUp);
|
|
121119
121119
|
dragBar.remove();
|
|
121120
|
+
|
|
121121
|
+
const parentRect = parent.getBoundingClientRect();
|
|
121122
|
+
|
|
121123
|
+
// 현재 드래그 위치 계산 (부모 기준)
|
|
121124
|
+
const position = (this.#mode === "h")
|
|
121125
|
+
? e.clientX - parentRect.left
|
|
121126
|
+
: e.clientY - parentRect.top;
|
|
121127
|
+
|
|
121128
|
+
// 형제 요소들
|
|
121129
|
+
const prev = this.previousElementSibling;
|
|
121130
|
+
const next = this.nextElementSibling;
|
|
121131
|
+
|
|
121132
|
+
if (!prev || !next) return;
|
|
121133
|
+
|
|
121134
|
+
if (this.#mode === "h") {
|
|
121135
|
+
prev.style.width = `${position}px`;
|
|
121136
|
+
next.style.width = `${parentRect.width - position - this.offsetWidth}px`;
|
|
121137
|
+
} else {
|
|
121138
|
+
prev.style.height = `${position}px`;
|
|
121139
|
+
next.style.height = `${parentRect.height - position - this.offsetHeight}px`;
|
|
121140
|
+
}
|
|
121120
121141
|
};
|
|
121121
121142
|
|
|
121143
|
+
|
|
121122
121144
|
window.addEventListener("mousemove", onMove);
|
|
121123
121145
|
window.addEventListener("mouseup", onUp);
|
|
121124
121146
|
};
|
package/dist/nx/nxSplitter.js
CHANGED
|
@@ -72,12 +72,34 @@ class nxSplitter extends HTMLElement {
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
const onUp =
|
|
75
|
+
const onUp = e => {
|
|
76
76
|
window.removeEventListener("mousemove", onMove);
|
|
77
77
|
window.removeEventListener("mouseup", onUp);
|
|
78
78
|
dragBar.remove();
|
|
79
|
+
|
|
80
|
+
const parentRect = parent.getBoundingClientRect();
|
|
81
|
+
|
|
82
|
+
// 현재 드래그 위치 계산 (부모 기준)
|
|
83
|
+
const position = (this.#mode === "h")
|
|
84
|
+
? e.clientX - parentRect.left
|
|
85
|
+
: e.clientY - parentRect.top;
|
|
86
|
+
|
|
87
|
+
// 형제 요소들
|
|
88
|
+
const prev = this.previousElementSibling;
|
|
89
|
+
const next = this.nextElementSibling;
|
|
90
|
+
|
|
91
|
+
if (!prev || !next) return;
|
|
92
|
+
|
|
93
|
+
if (this.#mode === "h") {
|
|
94
|
+
prev.style.width = `${position}px`;
|
|
95
|
+
next.style.width = `${parentRect.width - position - this.offsetWidth}px`;
|
|
96
|
+
} else {
|
|
97
|
+
prev.style.height = `${position}px`;
|
|
98
|
+
next.style.height = `${parentRect.height - position - this.offsetHeight}px`;
|
|
99
|
+
}
|
|
79
100
|
};
|
|
80
101
|
|
|
102
|
+
|
|
81
103
|
window.addEventListener("mousemove", onMove);
|
|
82
104
|
window.addEventListener("mouseup", onUp);
|
|
83
105
|
};
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -72,12 +72,34 @@ class nxSplitter extends HTMLElement {
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
const onUp =
|
|
75
|
+
const onUp = e => {
|
|
76
76
|
window.removeEventListener("mousemove", onMove);
|
|
77
77
|
window.removeEventListener("mouseup", onUp);
|
|
78
78
|
dragBar.remove();
|
|
79
|
+
|
|
80
|
+
const parentRect = parent.getBoundingClientRect();
|
|
81
|
+
|
|
82
|
+
// 현재 드래그 위치 계산 (부모 기준)
|
|
83
|
+
const position = (this.#mode === "h")
|
|
84
|
+
? e.clientX - parentRect.left
|
|
85
|
+
: e.clientY - parentRect.top;
|
|
86
|
+
|
|
87
|
+
// 형제 요소들
|
|
88
|
+
const prev = this.previousElementSibling;
|
|
89
|
+
const next = this.nextElementSibling;
|
|
90
|
+
|
|
91
|
+
if (!prev || !next) return;
|
|
92
|
+
|
|
93
|
+
if (this.#mode === "h") {
|
|
94
|
+
prev.style.width = `${position}px`;
|
|
95
|
+
next.style.width = `${parentRect.width - position - this.offsetWidth}px`;
|
|
96
|
+
} else {
|
|
97
|
+
prev.style.height = `${position}px`;
|
|
98
|
+
next.style.height = `${parentRect.height - position - this.offsetHeight}px`;
|
|
99
|
+
}
|
|
79
100
|
};
|
|
80
101
|
|
|
102
|
+
|
|
81
103
|
window.addEventListener("mousemove", onMove);
|
|
82
104
|
window.addEventListener("mouseup", onUp);
|
|
83
105
|
};
|