ninegrid2 6.343.0 → 6.345.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.
@@ -106,9 +106,9 @@ class aiMessage extends HTMLElement
106
106
 
107
107
  setTimeout(() => {
108
108
  const grd = this.shadowRoot.querySelector("nine-grid");
109
- grd.data.source = this.data;
110
- grd.setAttribute("display-row-count", 2);
111
- }, 300);
109
+ grd.data.source = this.#data;
110
+ //grd.setAttribute("display-row-count", 2);
111
+ }, 1000);
112
112
  };
113
113
  }
114
114
 
@@ -11039,8 +11039,7 @@ class ninegrid {
11039
11039
 
11040
11040
  static isEllipsis = (element) => {
11041
11041
  const computedStyle = window.getComputedStyle(element);
11042
-
11043
-
11042
+
11044
11043
  const clone = element.cloneNode(true);
11045
11044
  clone.style.fontFamily = computedStyle.fontFamily;
11046
11045
  clone.style.fontSize = computedStyle.fontSize;
@@ -11052,7 +11051,7 @@ class ninegrid {
11052
11051
  console.log(clone, element);
11053
11052
  console.log(clone.scrollWidth, element.clientWidth);
11054
11053
 
11055
- const isTruncated = clone.scrollWidth > element.clientWidth;
11054
+ const isTruncated = clone.scrollWidth > element.clientWidth || clone.scrollHeight > element.clientHeight;
11056
11055
  //document.body.removeChild(clone);
11057
11056
 
11058
11057
  return isTruncated;
@@ -27413,9 +27412,9 @@ class aiMessage extends HTMLElement
27413
27412
 
27414
27413
  setTimeout(() => {
27415
27414
  const grd = this.shadowRoot.querySelector("nine-grid");
27416
- grd.data.source = this.data;
27417
- grd.setAttribute("display-row-count", 2);
27418
- }, 300);
27415
+ grd.data.source = this.#data;
27416
+ //grd.setAttribute("display-row-count", 2);
27417
+ }, 1000);
27419
27418
  };
27420
27419
  }
27421
27420
 
@@ -11037,8 +11037,7 @@ class ninegrid {
11037
11037
 
11038
11038
  static isEllipsis = (element) => {
11039
11039
  const computedStyle = window.getComputedStyle(element);
11040
-
11041
-
11040
+
11042
11041
  const clone = element.cloneNode(true);
11043
11042
  clone.style.fontFamily = computedStyle.fontFamily;
11044
11043
  clone.style.fontSize = computedStyle.fontSize;
@@ -11050,7 +11049,7 @@ class ninegrid {
11050
11049
  console.log(clone, element);
11051
11050
  console.log(clone.scrollWidth, element.clientWidth);
11052
11051
 
11053
- const isTruncated = clone.scrollWidth > element.clientWidth;
11052
+ const isTruncated = clone.scrollWidth > element.clientWidth || clone.scrollHeight > element.clientHeight;
11054
11053
  //document.body.removeChild(clone);
11055
11054
 
11056
11055
  return isTruncated;
@@ -27411,9 +27410,9 @@ class aiMessage extends HTMLElement
27411
27410
 
27412
27411
  setTimeout(() => {
27413
27412
  const grd = this.shadowRoot.querySelector("nine-grid");
27414
- grd.data.source = this.data;
27415
- grd.setAttribute("display-row-count", 2);
27416
- }, 300);
27413
+ grd.data.source = this.#data;
27414
+ //grd.setAttribute("display-row-count", 2);
27415
+ }, 1000);
27417
27416
  };
27418
27417
  }
27419
27418
 
@@ -336,8 +336,7 @@ export class ninegrid {
336
336
 
337
337
  static isEllipsis = (element) => {
338
338
  const computedStyle = window.getComputedStyle(element);
339
-
340
-
339
+
341
340
  const clone = element.cloneNode(true);
342
341
  clone.style.fontFamily = computedStyle.fontFamily;
343
342
  clone.style.fontSize = computedStyle.fontSize;
@@ -349,7 +348,7 @@ export class ninegrid {
349
348
  console.log(clone, element);
350
349
  console.log(clone.scrollWidth, element.clientWidth);
351
350
 
352
- const isTruncated = clone.scrollWidth > element.clientWidth;
351
+ const isTruncated = clone.scrollWidth > element.clientWidth || clone.scrollHeight > element.clientHeight;
353
352
  //document.body.removeChild(clone);
354
353
 
355
354
  return isTruncated;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.343.0",
4
+ "version": "6.345.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -108,7 +108,7 @@ class aiMessage extends HTMLElement
108
108
  const grd = this.shadowRoot.querySelector("nine-grid");
109
109
  grd.data.source = this.#data;
110
110
  //grd.setAttribute("display-row-count", 2);
111
- }, 300);
111
+ }, 1000);
112
112
  };
113
113
  }
114
114