ninegrid2 6.691.0 β 6.693.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 +8 -8
- package/dist/bundle.esm.js +8 -8
- package/dist/nx/nxSplitter.js +31 -1
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +31 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -121126,7 +121126,6 @@ class nxSplitter extends HTMLElement {
|
|
|
121126
121126
|
}
|
|
121127
121127
|
};
|
|
121128
121128
|
|
|
121129
|
-
|
|
121130
121129
|
const onUp = (e) => {
|
|
121131
121130
|
window.removeEventListener("mousemove", onMove);
|
|
121132
121131
|
window.removeEventListener("mouseup", onUp);
|
|
@@ -121141,18 +121140,19 @@ class nxSplitter extends HTMLElement {
|
|
|
121141
121140
|
|
|
121142
121141
|
const prevRect = prev.getBoundingClientRect();
|
|
121143
121142
|
|
|
121144
|
-
//
|
|
121145
|
-
const
|
|
121143
|
+
// β
μλ μμΉ κ³μ°: prev κΈ°μ€μΌλ‘ μΌλ§λ μμ§μλμ§
|
|
121144
|
+
const delta = this.#mode === "h"
|
|
121146
121145
|
? e.clientX - prevRect.left
|
|
121147
121146
|
: e.clientY - prevRect.top;
|
|
121148
121147
|
|
|
121149
|
-
// prev μμ μμΉ κΈ°μ€μΌλ‘ μλ ν¬κΈ° μ€μ
|
|
121150
121148
|
if (this.#mode === "h") {
|
|
121151
|
-
prev.style.width = `${
|
|
121152
|
-
|
|
121149
|
+
prev.style.width = `${delta}px`;
|
|
121150
|
+
|
|
121151
|
+
// next λλΉλ μ 체 - prevμ offset - delta - splitter
|
|
121152
|
+
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - delta - splitterSize}px`;
|
|
121153
121153
|
} else {
|
|
121154
|
-
prev.style.height = `${
|
|
121155
|
-
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) -
|
|
121154
|
+
prev.style.height = `${delta}px`;
|
|
121155
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - delta - splitterSize}px`;
|
|
121156
121156
|
}
|
|
121157
121157
|
};
|
|
121158
121158
|
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121122,7 +121122,6 @@ class nxSplitter extends HTMLElement {
|
|
|
121122
121122
|
}
|
|
121123
121123
|
};
|
|
121124
121124
|
|
|
121125
|
-
|
|
121126
121125
|
const onUp = (e) => {
|
|
121127
121126
|
window.removeEventListener("mousemove", onMove);
|
|
121128
121127
|
window.removeEventListener("mouseup", onUp);
|
|
@@ -121137,18 +121136,19 @@ class nxSplitter extends HTMLElement {
|
|
|
121137
121136
|
|
|
121138
121137
|
const prevRect = prev.getBoundingClientRect();
|
|
121139
121138
|
|
|
121140
|
-
//
|
|
121141
|
-
const
|
|
121139
|
+
// β
μλ μμΉ κ³μ°: prev κΈ°μ€μΌλ‘ μΌλ§λ μμ§μλμ§
|
|
121140
|
+
const delta = this.#mode === "h"
|
|
121142
121141
|
? e.clientX - prevRect.left
|
|
121143
121142
|
: e.clientY - prevRect.top;
|
|
121144
121143
|
|
|
121145
|
-
// prev μμ μμΉ κΈ°μ€μΌλ‘ μλ ν¬κΈ° μ€μ
|
|
121146
121144
|
if (this.#mode === "h") {
|
|
121147
|
-
prev.style.width = `${
|
|
121148
|
-
|
|
121145
|
+
prev.style.width = `${delta}px`;
|
|
121146
|
+
|
|
121147
|
+
// next λλΉλ μ 체 - prevμ offset - delta - splitter
|
|
121148
|
+
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - delta - splitterSize}px`;
|
|
121149
121149
|
} else {
|
|
121150
|
-
prev.style.height = `${
|
|
121151
|
-
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) -
|
|
121150
|
+
prev.style.height = `${delta}px`;
|
|
121151
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - delta - splitterSize}px`;
|
|
121152
121152
|
}
|
|
121153
121153
|
};
|
|
121154
121154
|
|
package/dist/nx/nxSplitter.js
CHANGED
|
@@ -82,7 +82,7 @@ class nxSplitter extends HTMLElement {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
const
|
|
85
|
+
const onUp1 = (e) => {
|
|
86
86
|
window.removeEventListener("mousemove", onMove);
|
|
87
87
|
window.removeEventListener("mouseup", onUp);
|
|
88
88
|
dragBar.remove();
|
|
@@ -111,6 +111,36 @@ class nxSplitter extends HTMLElement {
|
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
+
const onUp = (e) => {
|
|
115
|
+
window.removeEventListener("mousemove", onMove);
|
|
116
|
+
window.removeEventListener("mouseup", onUp);
|
|
117
|
+
dragBar.remove();
|
|
118
|
+
|
|
119
|
+
const parentRect = parent.getBoundingClientRect();
|
|
120
|
+
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121
|
+
|
|
122
|
+
const prev = this.previousElementSibling;
|
|
123
|
+
const next = this.nextElementSibling;
|
|
124
|
+
if (!prev || !next) return;
|
|
125
|
+
|
|
126
|
+
const prevRect = prev.getBoundingClientRect();
|
|
127
|
+
|
|
128
|
+
// β
μλ μμΉ κ³μ°: prev κΈ°μ€μΌλ‘ μΌλ§λ μμ§μλμ§
|
|
129
|
+
const delta = this.#mode === "h"
|
|
130
|
+
? e.clientX - prevRect.left
|
|
131
|
+
: e.clientY - prevRect.top;
|
|
132
|
+
|
|
133
|
+
if (this.#mode === "h") {
|
|
134
|
+
prev.style.width = `${delta}px`;
|
|
135
|
+
|
|
136
|
+
// next λλΉλ μ 체 - prevμ offset - delta - splitter
|
|
137
|
+
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - delta - splitterSize}px`;
|
|
138
|
+
} else {
|
|
139
|
+
prev.style.height = `${delta}px`;
|
|
140
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - delta - splitterSize}px`;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
114
144
|
|
|
115
145
|
|
|
116
146
|
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -82,7 +82,7 @@ class nxSplitter extends HTMLElement {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
const
|
|
85
|
+
const onUp1 = (e) => {
|
|
86
86
|
window.removeEventListener("mousemove", onMove);
|
|
87
87
|
window.removeEventListener("mouseup", onUp);
|
|
88
88
|
dragBar.remove();
|
|
@@ -111,6 +111,36 @@ class nxSplitter extends HTMLElement {
|
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
+
const onUp = (e) => {
|
|
115
|
+
window.removeEventListener("mousemove", onMove);
|
|
116
|
+
window.removeEventListener("mouseup", onUp);
|
|
117
|
+
dragBar.remove();
|
|
118
|
+
|
|
119
|
+
const parentRect = parent.getBoundingClientRect();
|
|
120
|
+
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121
|
+
|
|
122
|
+
const prev = this.previousElementSibling;
|
|
123
|
+
const next = this.nextElementSibling;
|
|
124
|
+
if (!prev || !next) return;
|
|
125
|
+
|
|
126
|
+
const prevRect = prev.getBoundingClientRect();
|
|
127
|
+
|
|
128
|
+
// β
μλ μμΉ κ³μ°: prev κΈ°μ€μΌλ‘ μΌλ§λ μμ§μλμ§
|
|
129
|
+
const delta = this.#mode === "h"
|
|
130
|
+
? e.clientX - prevRect.left
|
|
131
|
+
: e.clientY - prevRect.top;
|
|
132
|
+
|
|
133
|
+
if (this.#mode === "h") {
|
|
134
|
+
prev.style.width = `${delta}px`;
|
|
135
|
+
|
|
136
|
+
// next λλΉλ μ 체 - prevμ offset - delta - splitter
|
|
137
|
+
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - delta - splitterSize}px`;
|
|
138
|
+
} else {
|
|
139
|
+
prev.style.height = `${delta}px`;
|
|
140
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - delta - splitterSize}px`;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
114
144
|
|
|
115
145
|
|
|
116
146
|
|