ninegrid2 6.701.0 β 6.702.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 +16 -12
- package/dist/bundle.esm.js +16 -12
- package/dist/nx/nxSplitter.js +14 -40
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +14 -40
package/dist/bundle.cjs.js
CHANGED
|
@@ -121126,33 +121126,36 @@ class nxSplitter extends HTMLElement {
|
|
|
121126
121126
|
}
|
|
121127
121127
|
};
|
|
121128
121128
|
|
|
121129
|
+
|
|
121130
|
+
|
|
121129
121131
|
const onUp = (e) => {
|
|
121130
121132
|
window.removeEventListener("mousemove", onMove);
|
|
121131
|
-
window.removeEventListener("mouseup",
|
|
121133
|
+
window.removeEventListener("mouseup", onDrop);
|
|
121132
121134
|
dragBar.remove();
|
|
121133
121135
|
|
|
121134
|
-
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121135
|
-
const parentSize = this.#mode === "h" ? parent.clientWidth : parent.clientHeight;
|
|
121136
|
-
|
|
121137
121136
|
const prev = this.previousElementSibling;
|
|
121138
121137
|
const next = this.nextElementSibling;
|
|
121139
121138
|
if (!prev || !next) return;
|
|
121140
121139
|
|
|
121141
|
-
|
|
121142
|
-
const nextOffset = this.#mode === "h" ? next.offsetLeft : next.offsetTop;
|
|
121140
|
+
this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121143
121141
|
|
|
121144
|
-
//
|
|
121142
|
+
// κΈ°μ€: prev + next λλΉ ν©κ³
|
|
121143
|
+
const totalSize = this.#mode === "h"
|
|
121144
|
+
? prev.offsetWidth + next.offsetWidth
|
|
121145
|
+
: prev.offsetHeight + next.offsetHeight;
|
|
121146
|
+
|
|
121147
|
+
// prev κΈ°μ€ μλ 거리 (λλκ·Έ 거리)
|
|
121145
121148
|
const delta = this.#mode === "h"
|
|
121146
|
-
? e.clientX -
|
|
121147
|
-
: e.clientY -
|
|
121149
|
+
? e.clientX - prev.getBoundingClientRect().left
|
|
121150
|
+
: e.clientY - prev.getBoundingClientRect().top;
|
|
121148
121151
|
|
|
121149
|
-
// π
|
|
121152
|
+
// π μ¬μ΄μ¦ μ μ©
|
|
121150
121153
|
if (this.#mode === "h") {
|
|
121151
121154
|
prev.style.width = `${delta}px`;
|
|
121152
|
-
next.style.width = `${
|
|
121155
|
+
next.style.width = `${totalSize - delta}px`;
|
|
121153
121156
|
} else {
|
|
121154
121157
|
prev.style.height = `${delta}px`;
|
|
121155
|
-
next.style.height = `${
|
|
121158
|
+
next.style.height = `${totalSize - delta}px`;
|
|
121156
121159
|
}
|
|
121157
121160
|
};
|
|
121158
121161
|
|
|
@@ -121160,6 +121163,7 @@ class nxSplitter extends HTMLElement {
|
|
|
121160
121163
|
|
|
121161
121164
|
|
|
121162
121165
|
|
|
121166
|
+
|
|
121163
121167
|
window.addEventListener("mousemove", onMove);
|
|
121164
121168
|
window.addEventListener("mouseup", onUp);
|
|
121165
121169
|
};
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121122,33 +121122,36 @@ class nxSplitter extends HTMLElement {
|
|
|
121122
121122
|
}
|
|
121123
121123
|
};
|
|
121124
121124
|
|
|
121125
|
+
|
|
121126
|
+
|
|
121125
121127
|
const onUp = (e) => {
|
|
121126
121128
|
window.removeEventListener("mousemove", onMove);
|
|
121127
|
-
window.removeEventListener("mouseup",
|
|
121129
|
+
window.removeEventListener("mouseup", onDrop);
|
|
121128
121130
|
dragBar.remove();
|
|
121129
121131
|
|
|
121130
|
-
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121131
|
-
const parentSize = this.#mode === "h" ? parent.clientWidth : parent.clientHeight;
|
|
121132
|
-
|
|
121133
121132
|
const prev = this.previousElementSibling;
|
|
121134
121133
|
const next = this.nextElementSibling;
|
|
121135
121134
|
if (!prev || !next) return;
|
|
121136
121135
|
|
|
121137
|
-
|
|
121138
|
-
const nextOffset = this.#mode === "h" ? next.offsetLeft : next.offsetTop;
|
|
121136
|
+
this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
121139
121137
|
|
|
121140
|
-
//
|
|
121138
|
+
// κΈ°μ€: prev + next λλΉ ν©κ³
|
|
121139
|
+
const totalSize = this.#mode === "h"
|
|
121140
|
+
? prev.offsetWidth + next.offsetWidth
|
|
121141
|
+
: prev.offsetHeight + next.offsetHeight;
|
|
121142
|
+
|
|
121143
|
+
// prev κΈ°μ€ μλ 거리 (λλκ·Έ 거리)
|
|
121141
121144
|
const delta = this.#mode === "h"
|
|
121142
|
-
? e.clientX -
|
|
121143
|
-
: e.clientY -
|
|
121145
|
+
? e.clientX - prev.getBoundingClientRect().left
|
|
121146
|
+
: e.clientY - prev.getBoundingClientRect().top;
|
|
121144
121147
|
|
|
121145
|
-
// π
|
|
121148
|
+
// π μ¬μ΄μ¦ μ μ©
|
|
121146
121149
|
if (this.#mode === "h") {
|
|
121147
121150
|
prev.style.width = `${delta}px`;
|
|
121148
|
-
next.style.width = `${
|
|
121151
|
+
next.style.width = `${totalSize - delta}px`;
|
|
121149
121152
|
} else {
|
|
121150
121153
|
prev.style.height = `${delta}px`;
|
|
121151
|
-
next.style.height = `${
|
|
121154
|
+
next.style.height = `${totalSize - delta}px`;
|
|
121152
121155
|
}
|
|
121153
121156
|
};
|
|
121154
121157
|
|
|
@@ -121156,6 +121159,7 @@ class nxSplitter extends HTMLElement {
|
|
|
121156
121159
|
|
|
121157
121160
|
|
|
121158
121161
|
|
|
121162
|
+
|
|
121159
121163
|
window.addEventListener("mousemove", onMove);
|
|
121160
121164
|
window.addEventListener("mouseup", onUp);
|
|
121161
121165
|
};
|
package/dist/nx/nxSplitter.js
CHANGED
|
@@ -82,62 +82,35 @@ class nxSplitter extends HTMLElement {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
const onUp1 = (e) => {
|
|
86
|
-
window.removeEventListener("mousemove", onMove);
|
|
87
|
-
window.removeEventListener("mouseup", onUp);
|
|
88
|
-
dragBar.remove();
|
|
89
|
-
|
|
90
|
-
const parentRect = parent.getBoundingClientRect();
|
|
91
|
-
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
92
|
-
|
|
93
|
-
const prev = this.previousElementSibling;
|
|
94
|
-
const next = this.nextElementSibling;
|
|
95
|
-
if (!prev || !next) return;
|
|
96
|
-
|
|
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 μμ μμΉ κΈ°μ€μΌλ‘ μλ ν¬κΈ° μ€μ
|
|
105
|
-
if (this.#mode === "h") {
|
|
106
|
-
prev.style.width = `${position}px`;
|
|
107
|
-
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - position - splitterSize}px`;
|
|
108
|
-
} else {
|
|
109
|
-
prev.style.height = `${position}px`;
|
|
110
|
-
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - position - splitterSize}px`;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
85
|
|
|
114
86
|
const onUp = (e) => {
|
|
115
87
|
window.removeEventListener("mousemove", onMove);
|
|
116
|
-
window.removeEventListener("mouseup",
|
|
88
|
+
window.removeEventListener("mouseup", onDrop);
|
|
117
89
|
dragBar.remove();
|
|
118
90
|
|
|
119
|
-
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
120
|
-
const parentSize = this.#mode === "h" ? parent.clientWidth : parent.clientHeight;
|
|
121
|
-
|
|
122
91
|
const prev = this.previousElementSibling;
|
|
123
92
|
const next = this.nextElementSibling;
|
|
124
93
|
if (!prev || !next) return;
|
|
125
94
|
|
|
126
|
-
const
|
|
127
|
-
const nextOffset = this.#mode === "h" ? next.offsetLeft : next.offsetTop;
|
|
95
|
+
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
128
96
|
|
|
129
|
-
//
|
|
97
|
+
// κΈ°μ€: prev + next λλΉ ν©κ³
|
|
98
|
+
const totalSize = this.#mode === "h"
|
|
99
|
+
? prev.offsetWidth + next.offsetWidth
|
|
100
|
+
: prev.offsetHeight + next.offsetHeight;
|
|
101
|
+
|
|
102
|
+
// prev κΈ°μ€ μλ 거리 (λλκ·Έ 거리)
|
|
130
103
|
const delta = this.#mode === "h"
|
|
131
|
-
? e.clientX -
|
|
132
|
-
: e.clientY -
|
|
104
|
+
? e.clientX - prev.getBoundingClientRect().left
|
|
105
|
+
: e.clientY - prev.getBoundingClientRect().top;
|
|
133
106
|
|
|
134
|
-
// π
|
|
107
|
+
// π μ¬μ΄μ¦ μ μ©
|
|
135
108
|
if (this.#mode === "h") {
|
|
136
109
|
prev.style.width = `${delta}px`;
|
|
137
|
-
next.style.width = `${
|
|
110
|
+
next.style.width = `${totalSize - delta}px`;
|
|
138
111
|
} else {
|
|
139
112
|
prev.style.height = `${delta}px`;
|
|
140
|
-
next.style.height = `${
|
|
113
|
+
next.style.height = `${totalSize - delta}px`;
|
|
141
114
|
}
|
|
142
115
|
};
|
|
143
116
|
|
|
@@ -145,6 +118,7 @@ class nxSplitter extends HTMLElement {
|
|
|
145
118
|
|
|
146
119
|
|
|
147
120
|
|
|
121
|
+
|
|
148
122
|
window.addEventListener("mousemove", onMove);
|
|
149
123
|
window.addEventListener("mouseup", onUp);
|
|
150
124
|
};
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -82,62 +82,35 @@ class nxSplitter extends HTMLElement {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
const onUp1 = (e) => {
|
|
86
|
-
window.removeEventListener("mousemove", onMove);
|
|
87
|
-
window.removeEventListener("mouseup", onUp);
|
|
88
|
-
dragBar.remove();
|
|
89
|
-
|
|
90
|
-
const parentRect = parent.getBoundingClientRect();
|
|
91
|
-
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
92
|
-
|
|
93
|
-
const prev = this.previousElementSibling;
|
|
94
|
-
const next = this.nextElementSibling;
|
|
95
|
-
if (!prev || !next) return;
|
|
96
|
-
|
|
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 μμ μμΉ κΈ°μ€μΌλ‘ μλ ν¬κΈ° μ€μ
|
|
105
|
-
if (this.#mode === "h") {
|
|
106
|
-
prev.style.width = `${position}px`;
|
|
107
|
-
next.style.width = `${parentRect.width - (prevRect.left - parentRect.left) - position - splitterSize}px`;
|
|
108
|
-
} else {
|
|
109
|
-
prev.style.height = `${position}px`;
|
|
110
|
-
next.style.height = `${parentRect.height - (prevRect.top - parentRect.top) - position - splitterSize}px`;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
85
|
|
|
114
86
|
const onUp = (e) => {
|
|
115
87
|
window.removeEventListener("mousemove", onMove);
|
|
116
|
-
window.removeEventListener("mouseup",
|
|
88
|
+
window.removeEventListener("mouseup", onDrop);
|
|
117
89
|
dragBar.remove();
|
|
118
90
|
|
|
119
|
-
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
120
|
-
const parentSize = this.#mode === "h" ? parent.clientWidth : parent.clientHeight;
|
|
121
|
-
|
|
122
91
|
const prev = this.previousElementSibling;
|
|
123
92
|
const next = this.nextElementSibling;
|
|
124
93
|
if (!prev || !next) return;
|
|
125
94
|
|
|
126
|
-
const
|
|
127
|
-
const nextOffset = this.#mode === "h" ? next.offsetLeft : next.offsetTop;
|
|
95
|
+
const splitterSize = this.#mode === "h" ? this.offsetWidth : this.offsetHeight;
|
|
128
96
|
|
|
129
|
-
//
|
|
97
|
+
// κΈ°μ€: prev + next λλΉ ν©κ³
|
|
98
|
+
const totalSize = this.#mode === "h"
|
|
99
|
+
? prev.offsetWidth + next.offsetWidth
|
|
100
|
+
: prev.offsetHeight + next.offsetHeight;
|
|
101
|
+
|
|
102
|
+
// prev κΈ°μ€ μλ 거리 (λλκ·Έ 거리)
|
|
130
103
|
const delta = this.#mode === "h"
|
|
131
|
-
? e.clientX -
|
|
132
|
-
: e.clientY -
|
|
104
|
+
? e.clientX - prev.getBoundingClientRect().left
|
|
105
|
+
: e.clientY - prev.getBoundingClientRect().top;
|
|
133
106
|
|
|
134
|
-
// π
|
|
107
|
+
// π μ¬μ΄μ¦ μ μ©
|
|
135
108
|
if (this.#mode === "h") {
|
|
136
109
|
prev.style.width = `${delta}px`;
|
|
137
|
-
next.style.width = `${
|
|
110
|
+
next.style.width = `${totalSize - delta}px`;
|
|
138
111
|
} else {
|
|
139
112
|
prev.style.height = `${delta}px`;
|
|
140
|
-
next.style.height = `${
|
|
113
|
+
next.style.height = `${totalSize - delta}px`;
|
|
141
114
|
}
|
|
142
115
|
};
|
|
143
116
|
|
|
@@ -145,6 +118,7 @@ class nxSplitter extends HTMLElement {
|
|
|
145
118
|
|
|
146
119
|
|
|
147
120
|
|
|
121
|
+
|
|
148
122
|
window.addEventListener("mousemove", onMove);
|
|
149
123
|
window.addEventListener("mouseup", onUp);
|
|
150
124
|
};
|