ninegrid2 6.330.0 → 6.332.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.
@@ -11038,9 +11038,14 @@ class ninegrid {
11038
11038
  };
11039
11039
 
11040
11040
  static isEllipsis = (element) => {
11041
+ const computedStyle = window.getComputedStyle(element);
11042
+
11043
+
11041
11044
  const clone = element.cloneNode(true);
11042
- clone.style.width = "auto";
11043
- clone.style.padding = "0";
11045
+ clone.style.fontFamily = computedStyle.fontFamily;
11046
+ clone.style.fontSize = computedStyle.fontSize;
11047
+ clone.style.lineHeight = computedStyle.lineHeight;
11048
+ clone.style.width = computedStyle.width; // 원본 너비 유지
11044
11049
  //clone.style.visibility = "hidden";
11045
11050
  document.body.appendChild(clone);
11046
11051
 
@@ -11036,9 +11036,14 @@ class ninegrid {
11036
11036
  };
11037
11037
 
11038
11038
  static isEllipsis = (element) => {
11039
+ const computedStyle = window.getComputedStyle(element);
11040
+
11041
+
11039
11042
  const clone = element.cloneNode(true);
11040
- clone.style.width = "auto";
11041
- clone.style.padding = "0";
11043
+ clone.style.fontFamily = computedStyle.fontFamily;
11044
+ clone.style.fontSize = computedStyle.fontSize;
11045
+ clone.style.lineHeight = computedStyle.lineHeight;
11046
+ clone.style.width = computedStyle.width; // 원본 너비 유지
11042
11047
  //clone.style.visibility = "hidden";
11043
11048
  document.body.appendChild(clone);
11044
11049
 
@@ -335,9 +335,14 @@ export class ninegrid {
335
335
  };
336
336
 
337
337
  static isEllipsis = (element) => {
338
+ const computedStyle = window.getComputedStyle(element);
339
+
340
+
338
341
  const clone = element.cloneNode(true);
339
- clone.style.width = "auto";
340
- clone.style.padding = "0";
342
+ clone.style.fontFamily = computedStyle.fontFamily;
343
+ clone.style.fontSize = computedStyle.fontSize;
344
+ clone.style.lineHeight = computedStyle.lineHeight;
345
+ clone.style.width = computedStyle.width; // 원본 너비 유지
341
346
  //clone.style.visibility = "hidden";
342
347
  document.body.appendChild(clone);
343
348
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.330.0",
4
+ "version": "6.332.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -335,9 +335,14 @@ export class ninegrid {
335
335
  };
336
336
 
337
337
  static isEllipsis = (element) => {
338
+ const computedStyle = window.getComputedStyle(element);
339
+
340
+
338
341
  const clone = element.cloneNode(true);
339
- clone.style.width = "auto";
340
- clone.style.padding = "0";
342
+ clone.style.fontFamily = computedStyle.fontFamily;
343
+ clone.style.fontSize = computedStyle.fontSize;
344
+ clone.style.lineHeight = computedStyle.lineHeight;
345
+ clone.style.width = computedStyle.width; // 원본 너비 유지
341
346
  //clone.style.visibility = "hidden";
342
347
  document.body.appendChild(clone);
343
348