瀏覽代碼

New stack manager dep

Aleksandr Aleksandrov 6 年之前
父節點
當前提交
f1470985c0
共有 3 個文件被更改,包括 14 次插入15 次删除
  1. 2 2
      package.json
  2. 6 3
      src/watch.ts
  3. 6 10
      yarn.lock

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ex-helpers/element",
-  "version": "0.1.6",
+  "version": "0.1.7",
   "description": "Several element wrapper helpers",
   "scripts": {
     "build": "exb",
@@ -9,7 +9,7 @@
   "author": "",
   "license": "ISC",
   "dependencies": {
-    "@ex-helpers/stack": "^0.1.1"
+    "@ex-helpers/stack": "^0.1.9"
   },
   "peerDependencies": {
     "rxjs": "^6.0.0",

+ 6 - 3
src/watch.ts

@@ -5,6 +5,8 @@ import {IncrementalStackManager} from '@ex-helpers/stack';
 
 declare module '@angular/core' {
     class ElementRef {
+        private _watchSizeCollection: any;
+
         nativeElement: any;
 
         constructor(nativeElement: any);
@@ -43,7 +45,7 @@ ElementRef.prototype.watchSize = function
             enumerable: false,
             configurable: true,
             writable: false,
-            value: new IncrementalStackManager<SizeCollectionItem>()
+            value: new IncrementalStackManager<SizeCollectionItem>('id')
         });
     }
     options = extend(DEFAULT_OPTIONS, options);
@@ -91,7 +93,7 @@ ElementRef.prototype.watchSize = function
 
 ElementRef.prototype.triggerSizeCheck = function () {
     if (this._watchSizeCollection) {
-        this._watchSizeCollection.call('triggerCheck');
+        this._watchSizeCollection.execute('triggerCheck');
     }
 };
 
@@ -101,5 +103,6 @@ ElementRef.prototype.watchChanges = function (callback: MutationCallback, option
         observer.observe(this.nativeElement, options);
         return () => observer.disconnect();
     }
-    return () => {};
+    return () => {
+    };
 };

+ 6 - 10
yarn.lock

@@ -17,8 +17,8 @@
     yargs "^12.0.2"
 
 "@ex-helpers/stack@^0.1.1":
-  version "0.1.1"
-  resolved "https://registry.desudesu.ru/@ex-helpers%2fstack/-/stack-0.1.1.tgz#97f4e320403e6b58012c346ffc4a00634ea94652"
+  version "0.1.9"
+  resolved "https://registry.desudesu.ru/@ex-helpers%2fstack/-/stack-0.1.9.tgz#69137983c7b0245c718c158b2b4a690402e77b8a"
   dependencies:
     lodash "^4.17.11"
     rxjs "^6"
@@ -167,7 +167,7 @@ locate-path@^3.0.0:
 
 lodash@^4.17.11:
   version "4.17.11"
-  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
+  resolved "https://registry.desudesu.ru/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
 
 map-age-cleaner@^0.1.1:
   version "0.1.2"
@@ -275,9 +275,9 @@ rimraf@^2.6.2:
   dependencies:
     glob "^7.0.5"
 
-rxjs@^6, rxjs@^6.0.0:
+rxjs@^6:
   version "6.3.3"
-  resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55"
+  resolved "https://registry.desudesu.ru/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55"
   dependencies:
     tslib "^1.9.0"
 
@@ -336,7 +336,7 @@ strip-eof@^1.0.0:
 
 tslib@^1.9.0:
   version "1.9.3"
-  resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
+  resolved "https://registry.desudesu.ru/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
 
 typescript@^2:
   version "2.9.2"
@@ -393,7 +393,3 @@ yargs@^12.0.2:
     which-module "^2.0.0"
     y18n "^3.2.1 || ^4.0.0"
     yargs-parser "^10.1.0"
-
-zone.js@~0.8.26:
-  version "0.8.26"
-  resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.26.tgz#7bdd72f7668c5a7ad6b118148b4ea39c59d08d2d"