ninegrid2 6.201.0 → 6.202.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.
@@ -18459,6 +18459,7 @@ class ngFilterPanel extends HTMLElement
18459
18459
 
18460
18460
  open = (filterButton) => {
18461
18461
 
18462
+ /**
18462
18463
  const owner = this.shadow.closest("nine-grid");
18463
18464
 
18464
18465
  var cell = filterButton.closest("th,td");
@@ -18471,6 +18472,26 @@ class ngFilterPanel extends HTMLElement
18471
18472
 
18472
18473
  //$(this).offset({left: l, top: t});
18473
18474
  $(this).css({left: l, top: t});
18475
+ */
18476
+
18477
+ const owner = this.shadow.closest("nine-grid");
18478
+
18479
+ var cell = filterButton.closest("th,td");
18480
+
18481
+ var filterButtonRect = filterButton.getBoundingClientRect();
18482
+ var ownerRect = owner.getBoundingClientRect();
18483
+ var cellRect = cell.getBoundingClientRect();
18484
+ var targetRect = this.getBoundingClientRect();
18485
+
18486
+ var l = filterButtonRect.left - ownerRect.left;
18487
+ if (l < 0) l = 0;
18488
+ if (l + targetRect.width > ownerRect.width) l = ownerRect.width - targetRect.width - 5;
18489
+
18490
+ var t = cellRect.top + cellRect.height - ownerRect.top;
18491
+
18492
+ this.style.left = `${l}px`; // ✅ 위치 설정
18493
+ this.style.top = `${t}px`;
18494
+
18474
18495
 
18475
18496
 
18476
18497
  //console.log(this, owner, filterButton.filterOptions, colnms);
@@ -18457,6 +18457,7 @@ class ngFilterPanel extends HTMLElement
18457
18457
 
18458
18458
  open = (filterButton) => {
18459
18459
 
18460
+ /**
18460
18461
  const owner = this.shadow.closest("nine-grid");
18461
18462
 
18462
18463
  var cell = filterButton.closest("th,td");
@@ -18469,6 +18470,26 @@ class ngFilterPanel extends HTMLElement
18469
18470
 
18470
18471
  //$(this).offset({left: l, top: t});
18471
18472
  $(this).css({left: l, top: t});
18473
+ */
18474
+
18475
+ const owner = this.shadow.closest("nine-grid");
18476
+
18477
+ var cell = filterButton.closest("th,td");
18478
+
18479
+ var filterButtonRect = filterButton.getBoundingClientRect();
18480
+ var ownerRect = owner.getBoundingClientRect();
18481
+ var cellRect = cell.getBoundingClientRect();
18482
+ var targetRect = this.getBoundingClientRect();
18483
+
18484
+ var l = filterButtonRect.left - ownerRect.left;
18485
+ if (l < 0) l = 0;
18486
+ if (l + targetRect.width > ownerRect.width) l = ownerRect.width - targetRect.width - 5;
18487
+
18488
+ var t = cellRect.top + cellRect.height - ownerRect.top;
18489
+
18490
+ this.style.left = `${l}px`; // ✅ 위치 설정
18491
+ this.style.top = `${t}px`;
18492
+
18472
18493
 
18473
18494
 
18474
18495
  //console.log(this, owner, filterButton.filterOptions, colnms);
@@ -529,6 +529,7 @@ class ngFilterPanel extends HTMLElement
529
529
 
530
530
  open = (filterButton) => {
531
531
 
532
+ /**
532
533
  const owner = this.shadow.closest("nine-grid");
533
534
 
534
535
  var cell = filterButton.closest("th,td");
@@ -541,6 +542,26 @@ class ngFilterPanel extends HTMLElement
541
542
 
542
543
  //$(this).offset({left: l, top: t});
543
544
  $(this).css({left: l, top: t});
545
+ */
546
+
547
+ const owner = this.shadow.closest("nine-grid");
548
+
549
+ var cell = filterButton.closest("th,td");
550
+
551
+ var filterButtonRect = filterButton.getBoundingClientRect();
552
+ var ownerRect = owner.getBoundingClientRect();
553
+ var cellRect = cell.getBoundingClientRect();
554
+ var targetRect = this.getBoundingClientRect();
555
+
556
+ var l = filterButtonRect.left - ownerRect.left;
557
+ if (l < 0) l = 0;
558
+ if (l + targetRect.width > ownerRect.width) l = ownerRect.width - targetRect.width - 5;
559
+
560
+ var t = cellRect.top + cellRect.height - ownerRect.top;
561
+
562
+ this.style.left = `${l}px`; // ✅ 위치 설정
563
+ this.style.top = `${t}px`;
564
+
544
565
 
545
566
 
546
567
  //console.log(this, owner, filterButton.filterOptions, colnms);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.201.0",
4
+ "version": "6.202.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -529,6 +529,7 @@ class ngFilterPanel extends HTMLElement
529
529
 
530
530
  open = (filterButton) => {
531
531
 
532
+ /**
532
533
  const owner = this.shadow.closest("nine-grid");
533
534
 
534
535
  var cell = filterButton.closest("th,td");
@@ -541,6 +542,26 @@ class ngFilterPanel extends HTMLElement
541
542
 
542
543
  //$(this).offset({left: l, top: t});
543
544
  $(this).css({left: l, top: t});
545
+ */
546
+
547
+ const owner = this.shadow.closest("nine-grid");
548
+
549
+ var cell = filterButton.closest("th,td");
550
+
551
+ var filterButtonRect = filterButton.getBoundingClientRect();
552
+ var ownerRect = owner.getBoundingClientRect();
553
+ var cellRect = cell.getBoundingClientRect();
554
+ var targetRect = this.getBoundingClientRect();
555
+
556
+ var l = filterButtonRect.left - ownerRect.left;
557
+ if (l < 0) l = 0;
558
+ if (l + targetRect.width > ownerRect.width) l = ownerRect.width - targetRect.width - 5;
559
+
560
+ var t = cellRect.top + cellRect.height - ownerRect.top;
561
+
562
+ this.style.left = `${l}px`; // ✅ 위치 설정
563
+ this.style.top = `${t}px`;
564
+
544
565
 
545
566
 
546
567
  //console.log(this, owner, filterButton.filterOptions, colnms);