@stemy/ngx-utils 13.3.2 → 13.4.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.
|
@@ -16,7 +16,7 @@ import { HttpClient, HttpHeaders, HttpParams, HttpUrlEncodingCodec, HttpEventTyp
|
|
|
16
16
|
import * as JSON5 from 'json5';
|
|
17
17
|
import * as i1$2 from '@angular/platform-browser';
|
|
18
18
|
import { ɵDomEventsPlugin, EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
19
|
-
import
|
|
19
|
+
import elementResizeDetectorMaker from 'element-resize-detector';
|
|
20
20
|
import * as i4 from '@angular/forms';
|
|
21
21
|
import { FormsModule } from '@angular/forms';
|
|
22
22
|
|
|
@@ -3522,6 +3522,9 @@ function emptyRemove$1() {
|
|
|
3522
3522
|
function isWindow(el) {
|
|
3523
3523
|
return typeof window !== "undefined" && el === window;
|
|
3524
3524
|
}
|
|
3525
|
+
const detector = elementResizeDetectorMaker({
|
|
3526
|
+
strategy: "scroll" // For ultra performance.
|
|
3527
|
+
});
|
|
3525
3528
|
class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
3526
3529
|
constructor(doc, universal) {
|
|
3527
3530
|
super(doc);
|
|
@@ -3537,12 +3540,13 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3537
3540
|
return emptyRemove$1;
|
|
3538
3541
|
const cb = el => {
|
|
3539
3542
|
zone.run(() => handler(el));
|
|
3543
|
+
console.log("HI", el);
|
|
3540
3544
|
};
|
|
3541
3545
|
if (isWindow(element)) {
|
|
3542
3546
|
element.addEventListener(eventName, cb);
|
|
3543
3547
|
}
|
|
3544
3548
|
else {
|
|
3545
|
-
detector.
|
|
3549
|
+
detector.listenTo(element, cb);
|
|
3546
3550
|
}
|
|
3547
3551
|
return () => {
|
|
3548
3552
|
try {
|
|
@@ -3550,7 +3554,7 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3550
3554
|
element.removeEventListener(eventName, cb);
|
|
3551
3555
|
}
|
|
3552
3556
|
else {
|
|
3553
|
-
detector.
|
|
3557
|
+
detector.uninstall(element);
|
|
3554
3558
|
}
|
|
3555
3559
|
}
|
|
3556
3560
|
catch (e) {
|