ninegrid2 6.341.0 → 6.343.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.341.0",
4
+ "version": "6.343.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -106,8 +106,8 @@ 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);
109
+ grd.data.source = this.#data;
110
+ //grd.setAttribute("display-row-count", 2);
111
111
  }, 300);
112
112
  };
113
113
  }
@@ -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;