ninegrid2 6.1007.0 → 6.1009.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.
@@ -121386,7 +121386,15 @@ class nxSplitter extends HTMLElement {
121386
121386
  const prevRect = prev?.getBoundingClientRect();
121387
121387
  const nextRect = next?.getBoundingClientRect();
121388
121388
 
121389
- this.#mode = (!prevRect || !nextRect) || (Math.abs(prevRect.top - nextRect.top) < 5) ? "h" : "v";
121389
+ if (this.classList.contains('h')) {
121390
+ this.#mode = "h";
121391
+ }
121392
+ else if (this.classList.contains('v')) {
121393
+ this.#mode = "v";
121394
+ }
121395
+ else {
121396
+ this.#mode = (!prevRect || !nextRect) || (Math.abs(prevRect.top - nextRect.top) < 5) ? "h" : "v";
121397
+ }
121390
121398
  };
121391
121399
 
121392
121400
  #startDrag = (e) => {
@@ -121979,7 +121987,7 @@ class NxLayout extends HTMLElement {
121979
121987
  if (col < numColumns - 1) {
121980
121988
  const splitter = document.createElement('nx-splitter');
121981
121989
  //splitter.setAttribute('direction', 'horizontal');
121982
- splitter.classList.add('h');
121990
+ //splitter.classList.add('h');
121983
121991
  rowWrapper.appendChild(splitter);
121984
121992
  }
121985
121993
  }
@@ -121989,8 +121997,8 @@ class NxLayout extends HTMLElement {
121989
121997
  if (row < numRows - 1) {
121990
121998
  const splitter = document.createElement('nx-splitter');
121991
121999
  //splitter.setAttribute('class', 'v');
121992
- splitter.classList.remove('h');
121993
- splitter.classList.add('v');
122000
+ //splitter.classList.remove('h');
122001
+ //splitter.classList.add('v');
121994
122002
  this.appendChild(splitter);
121995
122003
  }
121996
122004
  }
@@ -121382,7 +121382,15 @@ class nxSplitter extends HTMLElement {
121382
121382
  const prevRect = prev?.getBoundingClientRect();
121383
121383
  const nextRect = next?.getBoundingClientRect();
121384
121384
 
121385
- this.#mode = (!prevRect || !nextRect) || (Math.abs(prevRect.top - nextRect.top) < 5) ? "h" : "v";
121385
+ if (this.classList.contains('h')) {
121386
+ this.#mode = "h";
121387
+ }
121388
+ else if (this.classList.contains('v')) {
121389
+ this.#mode = "v";
121390
+ }
121391
+ else {
121392
+ this.#mode = (!prevRect || !nextRect) || (Math.abs(prevRect.top - nextRect.top) < 5) ? "h" : "v";
121393
+ }
121386
121394
  };
121387
121395
 
121388
121396
  #startDrag = (e) => {
@@ -121975,7 +121983,7 @@ class NxLayout extends HTMLElement {
121975
121983
  if (col < numColumns - 1) {
121976
121984
  const splitter = document.createElement('nx-splitter');
121977
121985
  //splitter.setAttribute('direction', 'horizontal');
121978
- splitter.classList.add('h');
121986
+ //splitter.classList.add('h');
121979
121987
  rowWrapper.appendChild(splitter);
121980
121988
  }
121981
121989
  }
@@ -121985,8 +121993,8 @@ class NxLayout extends HTMLElement {
121985
121993
  if (row < numRows - 1) {
121986
121994
  const splitter = document.createElement('nx-splitter');
121987
121995
  //splitter.setAttribute('class', 'v');
121988
- splitter.classList.remove('h');
121989
- splitter.classList.add('v');
121996
+ //splitter.classList.remove('h');
121997
+ //splitter.classList.add('v');
121990
121998
  this.appendChild(splitter);
121991
121999
  }
121992
122000
  }
@@ -84,7 +84,7 @@ class NxLayout extends HTMLElement {
84
84
  if (col < numColumns - 1) {
85
85
  const splitter = document.createElement('nx-splitter');
86
86
  //splitter.setAttribute('direction', 'horizontal');
87
- splitter.classList.add('h');
87
+ //splitter.classList.add('h');
88
88
  rowWrapper.appendChild(splitter);
89
89
  }
90
90
  }
@@ -94,8 +94,8 @@ class NxLayout extends HTMLElement {
94
94
  if (row < numRows - 1) {
95
95
  const splitter = document.createElement('nx-splitter');
96
96
  //splitter.setAttribute('class', 'v');
97
- splitter.classList.remove('h');
98
- splitter.classList.add('v');
97
+ //splitter.classList.remove('h');
98
+ //splitter.classList.add('v');
99
99
  this.appendChild(splitter);
100
100
  }
101
101
  }
@@ -19,7 +19,15 @@ class nxSplitter extends HTMLElement {
19
19
  const prevRect = prev?.getBoundingClientRect();
20
20
  const nextRect = next?.getBoundingClientRect();
21
21
 
22
- this.#mode = (!prevRect || !nextRect) || (Math.abs(prevRect.top - nextRect.top) < 5) ? "h" : "v";
22
+ if (this.classList.contains('h')) {
23
+ this.#mode = "h";
24
+ }
25
+ else if (this.classList.contains('v')) {
26
+ this.#mode = "v";
27
+ }
28
+ else {
29
+ this.#mode = (!prevRect || !nextRect) || (Math.abs(prevRect.top - nextRect.top) < 5) ? "h" : "v";
30
+ }
23
31
  };
24
32
 
25
33
  #startDrag = (e) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.1007.0",
4
+ "version": "6.1009.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -84,7 +84,7 @@ class NxLayout extends HTMLElement {
84
84
  if (col < numColumns - 1) {
85
85
  const splitter = document.createElement('nx-splitter');
86
86
  //splitter.setAttribute('direction', 'horizontal');
87
- splitter.classList.add('h');
87
+ //splitter.classList.add('h');
88
88
  rowWrapper.appendChild(splitter);
89
89
  }
90
90
  }
@@ -94,8 +94,8 @@ class NxLayout extends HTMLElement {
94
94
  if (row < numRows - 1) {
95
95
  const splitter = document.createElement('nx-splitter');
96
96
  //splitter.setAttribute('class', 'v');
97
- splitter.classList.remove('h');
98
- splitter.classList.add('v');
97
+ //splitter.classList.remove('h');
98
+ //splitter.classList.add('v');
99
99
  this.appendChild(splitter);
100
100
  }
101
101
  }
@@ -19,7 +19,15 @@ class nxSplitter extends HTMLElement {
19
19
  const prevRect = prev?.getBoundingClientRect();
20
20
  const nextRect = next?.getBoundingClientRect();
21
21
 
22
- this.#mode = (!prevRect || !nextRect) || (Math.abs(prevRect.top - nextRect.top) < 5) ? "h" : "v";
22
+ if (this.classList.contains('h')) {
23
+ this.#mode = "h";
24
+ }
25
+ else if (this.classList.contains('v')) {
26
+ this.#mode = "v";
27
+ }
28
+ else {
29
+ this.#mode = (!prevRect || !nextRect) || (Math.abs(prevRect.top - nextRect.top) < 5) ? "h" : "v";
30
+ }
23
31
  };
24
32
 
25
33
  #startDrag = (e) => {