@annalib/anna-core 35.3.5 → 35.3.6
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.
|
@@ -570,19 +570,23 @@ class ShowEllipsisTextOnHoverDirective {
|
|
|
570
570
|
}
|
|
571
571
|
onMouseEnter() {
|
|
572
572
|
const domElement = this.elementRef.nativeElement;
|
|
573
|
-
const clone = document.createElement(
|
|
574
|
-
clone.style.visibility =
|
|
575
|
-
clone.style.whiteSpace =
|
|
576
|
-
clone.style.position =
|
|
573
|
+
const clone = document.createElement("span");
|
|
574
|
+
clone.style.visibility = "hidden";
|
|
575
|
+
clone.style.whiteSpace = "nowrap";
|
|
576
|
+
clone.style.position = "absolute";
|
|
577
577
|
clone.style.font = window?.getComputedStyle(domElement)?.font;
|
|
578
578
|
clone.textContent = domElement.textContent;
|
|
579
579
|
document.body.appendChild(clone);
|
|
580
580
|
const fullWidth = clone.offsetWidth;
|
|
581
|
-
if (domElement.offsetWidth < domElement.scrollWidth ||
|
|
581
|
+
if (domElement.offsetWidth < domElement.scrollWidth ||
|
|
582
|
+
this.checkPositionsInDecimals(domElement) ||
|
|
583
|
+
fullWidth > domElement.offsetWidth) {
|
|
582
584
|
domElement.title = domElement.textContent === "" ? domElement.value : domElement.textContent;
|
|
583
585
|
}
|
|
584
|
-
else if (domElement.title)
|
|
586
|
+
else if (domElement.title) {
|
|
585
587
|
domElement.removeAttribute("title");
|
|
588
|
+
}
|
|
589
|
+
document.body.removeChild(clone);
|
|
586
590
|
}
|
|
587
591
|
checkPositionsInDecimals(domElement) {
|
|
588
592
|
// if we don't have any children element Then we can't calculate
|
|
@@ -6307,9 +6311,7 @@ class AnnaNumberFormatService {
|
|
|
6307
6311
|
const result = AnnaNumberFormatService.GetValueInUnits(Math.abs(inputValue));
|
|
6308
6312
|
let value = result[0];
|
|
6309
6313
|
const unit = result[1];
|
|
6310
|
-
|
|
6311
|
-
value = Math.round(((+value) + Number.EPSILON) * factor) / factor;
|
|
6312
|
-
// value = +(+value).toFixed(digitsToRoundDecimalPoint);
|
|
6314
|
+
value = +(+value).toFixed(digitsToRoundDecimalPoint);
|
|
6313
6315
|
if (inputValue < 0) {
|
|
6314
6316
|
value *= -1;
|
|
6315
6317
|
}
|