ninegrid2 6.853.0 → 6.855.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.
@@ -121342,8 +121342,14 @@ class nxSplitter extends HTMLElement {
121342
121342
  const prevRect = prev.getBoundingClientRect();
121343
121343
  const nextRect = next.getBoundingClientRect();
121344
121344
 
121345
- const left = e.clientX - (parent.offsetLeft + parent.clientLeft);
121346
- const top = e.clientY - (parent.offsetTop + parentRect.top);
121345
+ /**
121346
+ const clientPos = this.#mode === "h" ? e.clientX : e.clientY;
121347
+ const position = Math.max(min, Math.min(clientPos, max));
121348
+ const relative = position - parent.getBoundingClientRect()[this.#mode === "h" ? "left" : "top"];
121349
+ */
121350
+
121351
+ const left = e.clientX - parentRect.left;
121352
+ const top = e.clientY - parentRect.top;
121347
121353
 
121348
121354
  console.log(left, top);
121349
121355
 
@@ -121410,6 +121416,8 @@ class nxSplitter extends HTMLElement {
121410
121416
  prev.style.flex = "none";
121411
121417
  next.style.flex = "none";
121412
121418
 
121419
+ console.log(delta, totalSize);
121420
+
121413
121421
  // 📌 사이즈 적용
121414
121422
  if (this.#mode === "h") {
121415
121423
  prev.style.width = `${delta}px`;
@@ -121338,8 +121338,14 @@ class nxSplitter extends HTMLElement {
121338
121338
  const prevRect = prev.getBoundingClientRect();
121339
121339
  const nextRect = next.getBoundingClientRect();
121340
121340
 
121341
- const left = e.clientX - (parent.offsetLeft + parent.clientLeft);
121342
- const top = e.clientY - (parent.offsetTop + parentRect.top);
121341
+ /**
121342
+ const clientPos = this.#mode === "h" ? e.clientX : e.clientY;
121343
+ const position = Math.max(min, Math.min(clientPos, max));
121344
+ const relative = position - parent.getBoundingClientRect()[this.#mode === "h" ? "left" : "top"];
121345
+ */
121346
+
121347
+ const left = e.clientX - parentRect.left;
121348
+ const top = e.clientY - parentRect.top;
121343
121349
 
121344
121350
  console.log(left, top);
121345
121351
 
@@ -121406,6 +121412,8 @@ class nxSplitter extends HTMLElement {
121406
121412
  prev.style.flex = "none";
121407
121413
  next.style.flex = "none";
121408
121414
 
121415
+ console.log(delta, totalSize);
121416
+
121409
121417
  // 📌 사이즈 적용
121410
121418
  if (this.#mode === "h") {
121411
121419
  prev.style.width = `${delta}px`;
@@ -197,8 +197,14 @@ class nxSplitter extends HTMLElement {
197
197
  const prevRect = prev.getBoundingClientRect();
198
198
  const nextRect = next.getBoundingClientRect();
199
199
 
200
- const left = e.clientX - (parent.offsetLeft + parent.clientLeft);
201
- const top = e.clientY - (parent.offsetTop + parentRect.top);
200
+ /**
201
+ const clientPos = this.#mode === "h" ? e.clientX : e.clientY;
202
+ const position = Math.max(min, Math.min(clientPos, max));
203
+ const relative = position - parent.getBoundingClientRect()[this.#mode === "h" ? "left" : "top"];
204
+ */
205
+
206
+ const left = e.clientX - parentRect.left;
207
+ const top = e.clientY - parentRect.top;
202
208
 
203
209
  console.log(left, top);
204
210
 
@@ -265,6 +271,8 @@ class nxSplitter extends HTMLElement {
265
271
  prev.style.flex = "none";
266
272
  next.style.flex = "none";
267
273
 
274
+ console.log(delta, totalSize);
275
+
268
276
  // 📌 사이즈 적용
269
277
  if (this.#mode === "h") {
270
278
  prev.style.width = `${delta}px`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.853.0",
4
+ "version": "6.855.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -197,8 +197,14 @@ class nxSplitter extends HTMLElement {
197
197
  const prevRect = prev.getBoundingClientRect();
198
198
  const nextRect = next.getBoundingClientRect();
199
199
 
200
- const left = e.clientX - (parent.offsetLeft + parent.clientLeft);
201
- const top = e.clientY - (parent.offsetTop + parentRect.top);
200
+ /**
201
+ const clientPos = this.#mode === "h" ? e.clientX : e.clientY;
202
+ const position = Math.max(min, Math.min(clientPos, max));
203
+ const relative = position - parent.getBoundingClientRect()[this.#mode === "h" ? "left" : "top"];
204
+ */
205
+
206
+ const left = e.clientX - parentRect.left;
207
+ const top = e.clientY - parentRect.top;
202
208
 
203
209
  console.log(left, top);
204
210
 
@@ -265,6 +271,8 @@ class nxSplitter extends HTMLElement {
265
271
  prev.style.flex = "none";
266
272
  next.style.flex = "none";
267
273
 
274
+ console.log(delta, totalSize);
275
+
268
276
  // 📌 사이즈 적용
269
277
  if (this.#mode === "h") {
270
278
  prev.style.width = `${delta}px`;