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 +1 -1
- package/src/ai/aiMessage.js +2 -2
- package/src/utils/ninegrid.js +2 -3
package/package.json
CHANGED
package/src/ai/aiMessage.js
CHANGED
|
@@ -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
|
|
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
|
}
|
package/src/utils/ninegrid.js
CHANGED
|
@@ -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;
|