ninegrid2 6.847.0 → 6.849.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.
@@ -121211,30 +121211,30 @@ class nxSplitter extends HTMLElement {
121211
121211
  let totalPadding = 0;
121212
121212
 
121213
121213
  while (el) {
121214
- console.log(el);
121214
+ console.log(el, el instanceof Element, el instanceof ShadowRoot);
121215
121215
  if (el instanceof Element) {
121216
121216
  const style = getComputedStyle(el);
121217
121217
  totalPadding += parseFloat(style.paddingLeft) || 0;
121218
121218
  el = el.offsetParent;
121219
121219
  } else if (el instanceof ShadowRoot) {
121220
121220
 
121221
- console.log(el, el.host?.offsetParent);
121222
- // ShadowRoot면 host로 넘어가고 offsetParent 다시 탐색
121223
- el = el.host?.offsetParent;
121224
-
121225
-
121221
+ const host = el.host;
121222
+ const style = getComputedStyle(host);
121223
+ totalPadding += parseFloat(style.paddingLeft) || 0;
121224
+ el = host.offsetParent;
121226
121225
  } else {
121227
121226
  break;
121228
121227
  }
121229
121228
  }
121230
121229
 
121231
121230
 
121231
+
121232
121232
  console.log(totalPadding, e.clientX, parentRect.left);
121233
121233
 
121234
121234
  const left = e.clientX - parentRect.left + totalPadding;
121235
121235
  const top = e.clientY - parentRect.top + paddingTop;
121236
121236
 
121237
- console.log("5------", left, top);
121237
+ console.log("1------", left, top);
121238
121238
 
121239
121239
  // 방향별 위치 설정
121240
121240
  if (this.#mode === "h") {
@@ -121207,30 +121207,30 @@ class nxSplitter extends HTMLElement {
121207
121207
  let totalPadding = 0;
121208
121208
 
121209
121209
  while (el) {
121210
- console.log(el);
121210
+ console.log(el, el instanceof Element, el instanceof ShadowRoot);
121211
121211
  if (el instanceof Element) {
121212
121212
  const style = getComputedStyle(el);
121213
121213
  totalPadding += parseFloat(style.paddingLeft) || 0;
121214
121214
  el = el.offsetParent;
121215
121215
  } else if (el instanceof ShadowRoot) {
121216
121216
 
121217
- console.log(el, el.host?.offsetParent);
121218
- // ShadowRoot면 host로 넘어가고 offsetParent 다시 탐색
121219
- el = el.host?.offsetParent;
121220
-
121221
-
121217
+ const host = el.host;
121218
+ const style = getComputedStyle(host);
121219
+ totalPadding += parseFloat(style.paddingLeft) || 0;
121220
+ el = host.offsetParent;
121222
121221
  } else {
121223
121222
  break;
121224
121223
  }
121225
121224
  }
121226
121225
 
121227
121226
 
121227
+
121228
121228
  console.log(totalPadding, e.clientX, parentRect.left);
121229
121229
 
121230
121230
  const left = e.clientX - parentRect.left + totalPadding;
121231
121231
  const top = e.clientY - parentRect.top + paddingTop;
121232
121232
 
121233
- console.log("5------", left, top);
121233
+ console.log("1------", left, top);
121234
121234
 
121235
121235
  // 방향별 위치 설정
121236
121236
  if (this.#mode === "h") {
@@ -66,30 +66,30 @@ class nxSplitter extends HTMLElement {
66
66
  let totalPadding = 0;
67
67
 
68
68
  while (el) {
69
- console.log(el);
69
+ console.log(el, el instanceof Element, el instanceof ShadowRoot);
70
70
  if (el instanceof Element) {
71
71
  const style = getComputedStyle(el);
72
72
  totalPadding += parseFloat(style.paddingLeft) || 0;
73
73
  el = el.offsetParent;
74
74
  } else if (el instanceof ShadowRoot) {
75
75
 
76
- console.log(el, el.host?.offsetParent);
77
- // ShadowRoot면 host로 넘어가고 offsetParent 다시 탐색
78
- el = el.host?.offsetParent;
79
-
80
-
76
+ const host = el.host;
77
+ const style = getComputedStyle(host);
78
+ totalPadding += parseFloat(style.paddingLeft) || 0;
79
+ el = host.offsetParent;
81
80
  } else {
82
81
  break;
83
82
  }
84
83
  }
85
84
 
86
85
 
86
+
87
87
  console.log(totalPadding, e.clientX, parentRect.left);
88
88
 
89
89
  const left = e.clientX - parentRect.left + totalPadding;
90
90
  const top = e.clientY - parentRect.top + paddingTop;
91
91
 
92
- console.log("5------", left, top);
92
+ console.log("1------", left, top);
93
93
 
94
94
  // 방향별 위치 설정
95
95
  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.847.0",
4
+ "version": "6.849.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -66,30 +66,30 @@ class nxSplitter extends HTMLElement {
66
66
  let totalPadding = 0;
67
67
 
68
68
  while (el) {
69
- console.log(el);
69
+ console.log(el, el instanceof Element, el instanceof ShadowRoot);
70
70
  if (el instanceof Element) {
71
71
  const style = getComputedStyle(el);
72
72
  totalPadding += parseFloat(style.paddingLeft) || 0;
73
73
  el = el.offsetParent;
74
74
  } else if (el instanceof ShadowRoot) {
75
75
 
76
- console.log(el, el.host?.offsetParent);
77
- // ShadowRoot면 host로 넘어가고 offsetParent 다시 탐색
78
- el = el.host?.offsetParent;
79
-
80
-
76
+ const host = el.host;
77
+ const style = getComputedStyle(host);
78
+ totalPadding += parseFloat(style.paddingLeft) || 0;
79
+ el = host.offsetParent;
81
80
  } else {
82
81
  break;
83
82
  }
84
83
  }
85
84
 
86
85
 
86
+
87
87
  console.log(totalPadding, e.clientX, parentRect.left);
88
88
 
89
89
  const left = e.clientX - parentRect.left + totalPadding;
90
90
  const top = e.clientY - parentRect.top + paddingTop;
91
91
 
92
- console.log("5------", left, top);
92
+ console.log("1------", left, top);
93
93
 
94
94
  // 방향별 위치 설정
95
95
  if (this.#mode === "h") {