@klippa/ngx-enhancy-forms 14.7.14 → 14.7.16
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.
|
@@ -393,10 +393,15 @@ class WithTooltipDirective {
|
|
|
393
393
|
this.div.style.zIndex = '2';
|
|
394
394
|
this.div.style.color = '#515365';
|
|
395
395
|
this.div.style.position = 'fixed';
|
|
396
|
-
this.div.style.
|
|
396
|
+
this.div.style.left = `${el.nativeElement.getBoundingClientRect().x}px`;
|
|
397
|
+
this.div.style.top = `${el.nativeElement.getBoundingClientRect().y}px`;
|
|
398
|
+
this.div.style.transform = `translate(calc(-100% + ${el.nativeElement.getBoundingClientRect().width}px), calc(-100% - 0.3rem))`;
|
|
399
|
+
this.div.style.maxWidth = '200px';
|
|
400
|
+
this.div.style.whiteSpace = 'break-spaces';
|
|
397
401
|
this.div.style.backgroundColor = 'white';
|
|
398
|
-
this.div.style.border = '1px solid
|
|
399
|
-
this.div.style.
|
|
402
|
+
this.div.style.border = '1px solid rgba(255, 128, 0, 0.1254901961)';
|
|
403
|
+
this.div.style.boxShadow = `2px 3px 10px 0px rgba(255, 128, 0, 0.1254901961)`;
|
|
404
|
+
this.div.style.padding = '0.3rem 0.5rem';
|
|
400
405
|
this.div.style.boxSizing = 'border-box';
|
|
401
406
|
this.div.style.borderRadius = '3px';
|
|
402
407
|
this.div.textContent = el.nativeElement.innerText;
|
|
@@ -404,16 +409,17 @@ class WithTooltipDirective {
|
|
|
404
409
|
this.triangle = document.createElement('div');
|
|
405
410
|
this.triangle.style.zIndex = '1';
|
|
406
411
|
this.triangle.style.position = 'fixed';
|
|
407
|
-
this.triangle.style.
|
|
412
|
+
this.triangle.style.left = `${el.nativeElement.getBoundingClientRect().x + (el.nativeElement.getBoundingClientRect().width / 2)}px`;
|
|
413
|
+
this.triangle.style.top = `${el.nativeElement.getBoundingClientRect().y}px`;
|
|
414
|
+
this.triangle.style.transform = `translate(-50%, calc(-100% + 0.1rem))`;
|
|
408
415
|
this.triangle.style.width = '0';
|
|
409
416
|
this.triangle.style.height = '0';
|
|
410
417
|
this.triangle.style.borderLeft = '0.8rem solid transparent';
|
|
411
418
|
this.triangle.style.borderRight = '0.8rem solid transparent';
|
|
412
|
-
this.triangle.style.borderTop = '0.8rem solid
|
|
419
|
+
this.triangle.style.borderTop = '0.8rem solid rgba(255, 128, 0, 0.1254901961)';
|
|
413
420
|
el.nativeElement.prepend(this.triangle);
|
|
414
421
|
});
|
|
415
422
|
el.nativeElement.addEventListener('mouseout', () => {
|
|
416
|
-
return;
|
|
417
423
|
try {
|
|
418
424
|
el.nativeElement.removeChild(this.div);
|
|
419
425
|
}
|