ninegrid2 6.688.0 β 6.691.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 -6
- package/dist/bundle.esm.js +11 -6
- package/dist/nx/nxSplitter.js +11 -6
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +11 -6
package/dist/bundle.cjs.js
CHANGED
|
@@ -121134,26 +121134,31 @@ class nxSplitter extends HTMLElement {
|
|
|
121134
121134
|
|
|
121135
121135
|
const parentRect = parent.getBoundingClientRect();
|
|
121136
121136
|
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121137
|
-
const position = this.#mode === "h"
|
|
121138
|
-
? e.clientX - parentRect.left
|
|
121139
|
-
: e.clientY - parentRect.top;
|
|
121140
121137
|
|
|
121141
121138
|
const prev = this.previousElementSibling;
|
|
121142
121139
|
const next = this.nextElementSibling;
|
|
121143
121140
|
if (!prev || !next) return;
|
|
121144
121141
|
|
|
121145
|
-
|
|
121142
|
+
const prevRect = prev.getBoundingClientRect();
|
|
121143
|
+
|
|
121144
|
+
// π λλκ·Έ μμΉμμ prev μμ μμΉλ₯Ό λΊ μλ μμΉ (prev κΈ°μ€)
|
|
121145
|
+
const position = this.#mode === "h"
|
|
121146
|
+
? e.clientX - prevRect.left
|
|
121147
|
+
: e.clientY - prevRect.top;
|
|
121148
|
+
|
|
121149
|
+
// prev μμ μμΉ κΈ°μ€μΌλ‘ μλ ν¬κΈ° μ€μ
|
|
121146
121150
|
if (this.#mode === "h") {
|
|
121147
121151
|
prev.style.width = `${position}px`;
|
|
121148
|
-
next.style.width = `${parentRect.width - position - splitterSize}px`;
|
|
121152
|
+
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - position - splitterSize}px`;
|
|
121149
121153
|
} else {
|
|
121150
121154
|
prev.style.height = `${position}px`;
|
|
121151
|
-
next.style.height = `${parentRect.height - position - splitterSize}px`;
|
|
121155
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - position - splitterSize}px`;
|
|
121152
121156
|
}
|
|
121153
121157
|
};
|
|
121154
121158
|
|
|
121155
121159
|
|
|
121156
121160
|
|
|
121161
|
+
|
|
121157
121162
|
window.addEventListener("mousemove", onMove);
|
|
121158
121163
|
window.addEventListener("mouseup", onUp);
|
|
121159
121164
|
};
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121130,26 +121130,31 @@ class nxSplitter extends HTMLElement {
|
|
|
121130
121130
|
|
|
121131
121131
|
const parentRect = parent.getBoundingClientRect();
|
|
121132
121132
|
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121133
|
-
const position = this.#mode === "h"
|
|
121134
|
-
? e.clientX - parentRect.left
|
|
121135
|
-
: e.clientY - parentRect.top;
|
|
121136
121133
|
|
|
121137
121134
|
const prev = this.previousElementSibling;
|
|
121138
121135
|
const next = this.nextElementSibling;
|
|
121139
121136
|
if (!prev || !next) return;
|
|
121140
121137
|
|
|
121141
|
-
|
|
121138
|
+
const prevRect = prev.getBoundingClientRect();
|
|
121139
|
+
|
|
121140
|
+
// π λλκ·Έ μμΉμμ prev μμ μμΉλ₯Ό λΊ μλ μμΉ (prev κΈ°μ€)
|
|
121141
|
+
const position = this.#mode === "h"
|
|
121142
|
+
? e.clientX - prevRect.left
|
|
121143
|
+
: e.clientY - prevRect.top;
|
|
121144
|
+
|
|
121145
|
+
// prev μμ μμΉ κΈ°μ€μΌλ‘ μλ ν¬κΈ° μ€μ
|
|
121142
121146
|
if (this.#mode === "h") {
|
|
121143
121147
|
prev.style.width = `${position}px`;
|
|
121144
|
-
next.style.width = `${parentRect.width - position - splitterSize}px`;
|
|
121148
|
+
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - position - splitterSize}px`;
|
|
121145
121149
|
} else {
|
|
121146
121150
|
prev.style.height = `${position}px`;
|
|
121147
|
-
next.style.height = `${parentRect.height - position - splitterSize}px`;
|
|
121151
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - position - splitterSize}px`;
|
|
121148
121152
|
}
|
|
121149
121153
|
};
|
|
121150
121154
|
|
|
121151
121155
|
|
|
121152
121156
|
|
|
121157
|
+
|
|
121153
121158
|
window.addEventListener("mousemove", onMove);
|
|
121154
121159
|
window.addEventListener("mouseup", onUp);
|
|
121155
121160
|
};
|
package/dist/nx/nxSplitter.js
CHANGED
|
@@ -89,26 +89,31 @@ class nxSplitter extends HTMLElement {
|
|
|
89
89
|
|
|
90
90
|
const parentRect = parent.getBoundingClientRect();
|
|
91
91
|
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
92
|
-
const position = this.#mode === "h"
|
|
93
|
-
? e.clientX - parentRect.left
|
|
94
|
-
: e.clientY - parentRect.top;
|
|
95
92
|
|
|
96
93
|
const prev = this.previousElementSibling;
|
|
97
94
|
const next = this.nextElementSibling;
|
|
98
95
|
if (!prev || !next) return;
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
const prevRect = prev.getBoundingClientRect();
|
|
98
|
+
|
|
99
|
+
// π λλκ·Έ μμΉμμ prev μμ μμΉλ₯Ό λΊ μλ μμΉ (prev κΈ°μ€)
|
|
100
|
+
const position = this.#mode === "h"
|
|
101
|
+
? e.clientX - prevRect.left
|
|
102
|
+
: e.clientY - prevRect.top;
|
|
103
|
+
|
|
104
|
+
// prev μμ μμΉ κΈ°μ€μΌλ‘ μλ ν¬κΈ° μ€μ
|
|
101
105
|
if (this.#mode === "h") {
|
|
102
106
|
prev.style.width = `${position}px`;
|
|
103
|
-
next.style.width = `${parentRect.width - position - splitterSize}px`;
|
|
107
|
+
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - position - splitterSize}px`;
|
|
104
108
|
} else {
|
|
105
109
|
prev.style.height = `${position}px`;
|
|
106
|
-
next.style.height = `${parentRect.height - position - splitterSize}px`;
|
|
110
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - position - splitterSize}px`;
|
|
107
111
|
}
|
|
108
112
|
};
|
|
109
113
|
|
|
110
114
|
|
|
111
115
|
|
|
116
|
+
|
|
112
117
|
window.addEventListener("mousemove", onMove);
|
|
113
118
|
window.addEventListener("mouseup", onUp);
|
|
114
119
|
};
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -89,26 +89,31 @@ class nxSplitter extends HTMLElement {
|
|
|
89
89
|
|
|
90
90
|
const parentRect = parent.getBoundingClientRect();
|
|
91
91
|
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
92
|
-
const position = this.#mode === "h"
|
|
93
|
-
? e.clientX - parentRect.left
|
|
94
|
-
: e.clientY - parentRect.top;
|
|
95
92
|
|
|
96
93
|
const prev = this.previousElementSibling;
|
|
97
94
|
const next = this.nextElementSibling;
|
|
98
95
|
if (!prev || !next) return;
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
const prevRect = prev.getBoundingClientRect();
|
|
98
|
+
|
|
99
|
+
// π λλκ·Έ μμΉμμ prev μμ μμΉλ₯Ό λΊ μλ μμΉ (prev κΈ°μ€)
|
|
100
|
+
const position = this.#mode === "h"
|
|
101
|
+
? e.clientX - prevRect.left
|
|
102
|
+
: e.clientY - prevRect.top;
|
|
103
|
+
|
|
104
|
+
// prev μμ μμΉ κΈ°μ€μΌλ‘ μλ ν¬κΈ° μ€μ
|
|
101
105
|
if (this.#mode === "h") {
|
|
102
106
|
prev.style.width = `${position}px`;
|
|
103
|
-
next.style.width = `${parentRect.width - position - splitterSize}px`;
|
|
107
|
+
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - position - splitterSize}px`;
|
|
104
108
|
} else {
|
|
105
109
|
prev.style.height = `${position}px`;
|
|
106
|
-
next.style.height = `${parentRect.height - position - splitterSize}px`;
|
|
110
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - position - splitterSize}px`;
|
|
107
111
|
}
|
|
108
112
|
};
|
|
109
113
|
|
|
110
114
|
|
|
111
115
|
|
|
116
|
+
|
|
112
117
|
window.addEventListener("mousemove", onMove);
|
|
113
118
|
window.addEventListener("mouseup", onUp);
|
|
114
119
|
};
|