ninegrid2 6.686.0 → 6.687.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 +11 -7
- package/dist/bundle.esm.js +11 -7
- package/dist/nx/nxSplitter.js +11 -7
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +11 -7
package/dist/bundle.cjs.js
CHANGED
|
@@ -121127,29 +121127,33 @@ class nxSplitter extends HTMLElement {
|
|
|
121127
121127
|
};
|
|
121128
121128
|
|
|
121129
121129
|
|
|
121130
|
-
const onUp = e => {
|
|
121130
|
+
const onUp = (e) => {
|
|
121131
121131
|
window.removeEventListener("mousemove", onMove);
|
|
121132
121132
|
window.removeEventListener("mouseup", onUp);
|
|
121133
121133
|
dragBar.remove();
|
|
121134
121134
|
|
|
121135
121135
|
const parentRect = parent.getBoundingClientRect();
|
|
121136
|
-
|
|
121137
|
-
|
|
121138
|
-
const position = (this.#mode === "h")
|
|
121136
|
+
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121137
|
+
const position = this.#mode === "h"
|
|
121139
121138
|
? e.clientX - parentRect.left
|
|
121140
121139
|
: e.clientY - parentRect.top;
|
|
121141
121140
|
|
|
121141
|
+
const prev = this.previousElementSibling;
|
|
121142
|
+
const next = this.nextElementSibling;
|
|
121143
|
+
if (!prev || !next) return;
|
|
121144
|
+
|
|
121145
|
+
// 📌 리사이즈 적용: 사용자 의도에 따라 prev, next 모두 업데이트
|
|
121142
121146
|
if (this.#mode === "h") {
|
|
121143
121147
|
prev.style.width = `${position}px`;
|
|
121144
|
-
next.style.width = `${parentRect.width - position -
|
|
121145
|
-
//next.style.width = `100%`;
|
|
121148
|
+
next.style.width = `${parentRect.width - position - splitterSize}px`;
|
|
121146
121149
|
} else {
|
|
121147
121150
|
prev.style.height = `${position}px`;
|
|
121148
|
-
next.style.height = `${parentRect.height - position -
|
|
121151
|
+
next.style.height = `${parentRect.height - position - splitterSize}px`;
|
|
121149
121152
|
}
|
|
121150
121153
|
};
|
|
121151
121154
|
|
|
121152
121155
|
|
|
121156
|
+
|
|
121153
121157
|
window.addEventListener("mousemove", onMove);
|
|
121154
121158
|
window.addEventListener("mouseup", onUp);
|
|
121155
121159
|
};
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121123,29 +121123,33 @@ class nxSplitter extends HTMLElement {
|
|
|
121123
121123
|
};
|
|
121124
121124
|
|
|
121125
121125
|
|
|
121126
|
-
const onUp = e => {
|
|
121126
|
+
const onUp = (e) => {
|
|
121127
121127
|
window.removeEventListener("mousemove", onMove);
|
|
121128
121128
|
window.removeEventListener("mouseup", onUp);
|
|
121129
121129
|
dragBar.remove();
|
|
121130
121130
|
|
|
121131
121131
|
const parentRect = parent.getBoundingClientRect();
|
|
121132
|
-
|
|
121133
|
-
|
|
121134
|
-
const position = (this.#mode === "h")
|
|
121132
|
+
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121133
|
+
const position = this.#mode === "h"
|
|
121135
121134
|
? e.clientX - parentRect.left
|
|
121136
121135
|
: e.clientY - parentRect.top;
|
|
121137
121136
|
|
|
121137
|
+
const prev = this.previousElementSibling;
|
|
121138
|
+
const next = this.nextElementSibling;
|
|
121139
|
+
if (!prev || !next) return;
|
|
121140
|
+
|
|
121141
|
+
// 📌 리사이즈 적용: 사용자 의도에 따라 prev, next 모두 업데이트
|
|
121138
121142
|
if (this.#mode === "h") {
|
|
121139
121143
|
prev.style.width = `${position}px`;
|
|
121140
|
-
next.style.width = `${parentRect.width - position -
|
|
121141
|
-
//next.style.width = `100%`;
|
|
121144
|
+
next.style.width = `${parentRect.width - position - splitterSize}px`;
|
|
121142
121145
|
} else {
|
|
121143
121146
|
prev.style.height = `${position}px`;
|
|
121144
|
-
next.style.height = `${parentRect.height - position -
|
|
121147
|
+
next.style.height = `${parentRect.height - position - splitterSize}px`;
|
|
121145
121148
|
}
|
|
121146
121149
|
};
|
|
121147
121150
|
|
|
121148
121151
|
|
|
121152
|
+
|
|
121149
121153
|
window.addEventListener("mousemove", onMove);
|
|
121150
121154
|
window.addEventListener("mouseup", onUp);
|
|
121151
121155
|
};
|
package/dist/nx/nxSplitter.js
CHANGED
|
@@ -82,29 +82,33 @@ class nxSplitter extends HTMLElement {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
const onUp = e => {
|
|
85
|
+
const onUp = (e) => {
|
|
86
86
|
window.removeEventListener("mousemove", onMove);
|
|
87
87
|
window.removeEventListener("mouseup", onUp);
|
|
88
88
|
dragBar.remove();
|
|
89
89
|
|
|
90
90
|
const parentRect = parent.getBoundingClientRect();
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const position = (this.#mode === "h")
|
|
91
|
+
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
92
|
+
const position = this.#mode === "h"
|
|
94
93
|
? e.clientX - parentRect.left
|
|
95
94
|
: e.clientY - parentRect.top;
|
|
96
95
|
|
|
96
|
+
const prev = this.previousElementSibling;
|
|
97
|
+
const next = this.nextElementSibling;
|
|
98
|
+
if (!prev || !next) return;
|
|
99
|
+
|
|
100
|
+
// 📌 리사이즈 적용: 사용자 의도에 따라 prev, next 모두 업데이트
|
|
97
101
|
if (this.#mode === "h") {
|
|
98
102
|
prev.style.width = `${position}px`;
|
|
99
|
-
next.style.width = `${parentRect.width - position -
|
|
100
|
-
//next.style.width = `100%`;
|
|
103
|
+
next.style.width = `${parentRect.width - position - splitterSize}px`;
|
|
101
104
|
} else {
|
|
102
105
|
prev.style.height = `${position}px`;
|
|
103
|
-
next.style.height = `${parentRect.height - position -
|
|
106
|
+
next.style.height = `${parentRect.height - position - splitterSize}px`;
|
|
104
107
|
}
|
|
105
108
|
};
|
|
106
109
|
|
|
107
110
|
|
|
111
|
+
|
|
108
112
|
window.addEventListener("mousemove", onMove);
|
|
109
113
|
window.addEventListener("mouseup", onUp);
|
|
110
114
|
};
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -82,29 +82,33 @@ class nxSplitter extends HTMLElement {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
const onUp = e => {
|
|
85
|
+
const onUp = (e) => {
|
|
86
86
|
window.removeEventListener("mousemove", onMove);
|
|
87
87
|
window.removeEventListener("mouseup", onUp);
|
|
88
88
|
dragBar.remove();
|
|
89
89
|
|
|
90
90
|
const parentRect = parent.getBoundingClientRect();
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const position = (this.#mode === "h")
|
|
91
|
+
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
92
|
+
const position = this.#mode === "h"
|
|
94
93
|
? e.clientX - parentRect.left
|
|
95
94
|
: e.clientY - parentRect.top;
|
|
96
95
|
|
|
96
|
+
const prev = this.previousElementSibling;
|
|
97
|
+
const next = this.nextElementSibling;
|
|
98
|
+
if (!prev || !next) return;
|
|
99
|
+
|
|
100
|
+
// 📌 리사이즈 적용: 사용자 의도에 따라 prev, next 모두 업데이트
|
|
97
101
|
if (this.#mode === "h") {
|
|
98
102
|
prev.style.width = `${position}px`;
|
|
99
|
-
next.style.width = `${parentRect.width - position -
|
|
100
|
-
//next.style.width = `100%`;
|
|
103
|
+
next.style.width = `${parentRect.width - position - splitterSize}px`;
|
|
101
104
|
} else {
|
|
102
105
|
prev.style.height = `${position}px`;
|
|
103
|
-
next.style.height = `${parentRect.height - position -
|
|
106
|
+
next.style.height = `${parentRect.height - position - splitterSize}px`;
|
|
104
107
|
}
|
|
105
108
|
};
|
|
106
109
|
|
|
107
110
|
|
|
111
|
+
|
|
108
112
|
window.addEventListener("mousemove", onMove);
|
|
109
113
|
window.addEventListener("mouseup", onUp);
|
|
110
114
|
};
|