ninegrid2 6.833.0 → 6.835.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.
@@ -121203,10 +121203,14 @@ class nxSplitter extends HTMLElement {
121203
121203
  const prevRect = prev.getBoundingClientRect();
121204
121204
  const nextRect = next.getBoundingClientRect();
121205
121205
 
121206
- const left = e.clientX - (parent.offsetLeft + parent.clientLeft);
121207
- const top = e.clientY - (parent.offsetTop + parentRect.top);
121206
+ const computedStyle = getComputedStyle(parent);
121207
+ const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
121208
+ const paddingTop = parseFloat(computedStyle.paddingTop) || 0;
121208
121209
 
121209
- console.log(left, top);
121210
+ const left = e.clientX - parentRect.left + paddingLeft;
121211
+ const top = e.clientY - parentRect.top + paddingTop;
121212
+
121213
+ console.log("------", left, top);
121210
121214
 
121211
121215
  // 방향별 위치 설정
121212
121216
  if (this.#mode === "h") {
@@ -121199,10 +121199,14 @@ class nxSplitter extends HTMLElement {
121199
121199
  const prevRect = prev.getBoundingClientRect();
121200
121200
  const nextRect = next.getBoundingClientRect();
121201
121201
 
121202
- const left = e.clientX - (parent.offsetLeft + parent.clientLeft);
121203
- const top = e.clientY - (parent.offsetTop + parentRect.top);
121202
+ const computedStyle = getComputedStyle(parent);
121203
+ const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
121204
+ const paddingTop = parseFloat(computedStyle.paddingTop) || 0;
121204
121205
 
121205
- console.log(left, top);
121206
+ const left = e.clientX - parentRect.left + paddingLeft;
121207
+ const top = e.clientY - parentRect.top + paddingTop;
121208
+
121209
+ console.log("------", left, top);
121206
121210
 
121207
121211
  // 방향별 위치 설정
121208
121212
  if (this.#mode === "h") {
@@ -58,10 +58,14 @@ class nxSplitter extends HTMLElement {
58
58
  const prevRect = prev.getBoundingClientRect();
59
59
  const nextRect = next.getBoundingClientRect();
60
60
 
61
- const left = e.clientX - (parent.offsetLeft + parent.clientLeft);
62
- const top = e.clientY - (parent.offsetTop + parentRect.top);
61
+ const computedStyle = getComputedStyle(parent);
62
+ const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
63
+ const paddingTop = parseFloat(computedStyle.paddingTop) || 0;
63
64
 
64
- console.log(left, top);
65
+ const left = e.clientX - parentRect.left + paddingLeft;
66
+ const top = e.clientY - parentRect.top + paddingTop;
67
+
68
+ console.log("------", left, top);
65
69
 
66
70
  // 방향별 위치 설정
67
71
  if (this.#mode === "h") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.833.0",
4
+ "version": "6.835.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -58,10 +58,14 @@ class nxSplitter extends HTMLElement {
58
58
  const prevRect = prev.getBoundingClientRect();
59
59
  const nextRect = next.getBoundingClientRect();
60
60
 
61
- const left = e.clientX - (parent.offsetLeft + parent.clientLeft);
62
- const top = e.clientY - (parent.offsetTop + parentRect.top);
61
+ const computedStyle = getComputedStyle(parent);
62
+ const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
63
+ const paddingTop = parseFloat(computedStyle.paddingTop) || 0;
63
64
 
64
- console.log(left, top);
65
+ const left = e.clientX - parentRect.left + paddingLeft;
66
+ const top = e.clientY - parentRect.top + paddingTop;
67
+
68
+ console.log("------", left, top);
65
69
 
66
70
  // 방향별 위치 설정
67
71
  if (this.#mode === "h") {