ninegrid2 6.688.0 β 6.692.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 +14 -9
- package/dist/bundle.esm.js +14 -9
- package/dist/nx/nxSplitter.js +42 -7
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +42 -7
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);
|
|
@@ -121134,26 +121133,32 @@ class nxSplitter extends HTMLElement {
|
|
|
121134
121133
|
|
|
121135
121134
|
const parentRect = parent.getBoundingClientRect();
|
|
121136
121135
|
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
121136
|
|
|
121141
121137
|
const prev = this.previousElementSibling;
|
|
121142
121138
|
const next = this.nextElementSibling;
|
|
121143
121139
|
if (!prev || !next) return;
|
|
121144
121140
|
|
|
121145
|
-
|
|
121141
|
+
const prevRect = prev.getBoundingClientRect();
|
|
121142
|
+
|
|
121143
|
+
// β
μλ μμΉ κ³μ°: prev κΈ°μ€μΌλ‘ μΌλ§λ μμ§μλμ§
|
|
121144
|
+
const delta = this.#mode === "h"
|
|
121145
|
+
? e.clientX - prevRect.left
|
|
121146
|
+
: e.clientY - prevRect.top;
|
|
121147
|
+
|
|
121146
121148
|
if (this.#mode === "h") {
|
|
121147
|
-
prev.style.width = `${
|
|
121148
|
-
|
|
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`;
|
|
121149
121153
|
} else {
|
|
121150
|
-
prev.style.height = `${
|
|
121151
|
-
next.style.height = `${parentRect.height -
|
|
121154
|
+
prev.style.height = `${delta}px`;
|
|
121155
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - delta - 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
|
@@ -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);
|
|
@@ -121130,26 +121129,32 @@ class nxSplitter extends HTMLElement {
|
|
|
121130
121129
|
|
|
121131
121130
|
const parentRect = parent.getBoundingClientRect();
|
|
121132
121131
|
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
121132
|
|
|
121137
121133
|
const prev = this.previousElementSibling;
|
|
121138
121134
|
const next = this.nextElementSibling;
|
|
121139
121135
|
if (!prev || !next) return;
|
|
121140
121136
|
|
|
121141
|
-
|
|
121137
|
+
const prevRect = prev.getBoundingClientRect();
|
|
121138
|
+
|
|
121139
|
+
// β
μλ μμΉ κ³μ°: prev κΈ°μ€μΌλ‘ μΌλ§λ μμ§μλμ§
|
|
121140
|
+
const delta = this.#mode === "h"
|
|
121141
|
+
? e.clientX - prevRect.left
|
|
121142
|
+
: e.clientY - prevRect.top;
|
|
121143
|
+
|
|
121142
121144
|
if (this.#mode === "h") {
|
|
121143
|
-
prev.style.width = `${
|
|
121144
|
-
|
|
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`;
|
|
121145
121149
|
} else {
|
|
121146
|
-
prev.style.height = `${
|
|
121147
|
-
next.style.height = `${parentRect.height -
|
|
121150
|
+
prev.style.height = `${delta}px`;
|
|
121151
|
+
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - delta - 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
|
@@ -82,33 +82,68 @@ 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();
|
|
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`;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
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`;
|
|
107
141
|
}
|
|
108
142
|
};
|
|
109
143
|
|
|
110
144
|
|
|
111
145
|
|
|
146
|
+
|
|
112
147
|
window.addEventListener("mousemove", onMove);
|
|
113
148
|
window.addEventListener("mouseup", onUp);
|
|
114
149
|
};
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -82,33 +82,68 @@ 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();
|
|
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`;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
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`;
|
|
107
141
|
}
|
|
108
142
|
};
|
|
109
143
|
|
|
110
144
|
|
|
111
145
|
|
|
146
|
+
|
|
112
147
|
window.addEventListener("mousemove", onMove);
|
|
113
148
|
window.addEventListener("mouseup", onUp);
|
|
114
149
|
};
|