@danielgindi/virtual-list-helper 1.0.10 → 1.0.12

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.
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * @danielgindi/virtual-list-helper 1.0.10
2
+ * @danielgindi/virtual-list-helper 1.0.12
3
3
  * git://github.com/danielgindi/virtual-list-helper.git
4
4
  */
5
5
  'use strict';
6
6
 
7
- var Css = require('@danielgindi/dom-utils/lib/Css');
7
+ var Css_js = require('@danielgindi/dom-utils/lib/Css.js');
8
8
 
9
9
  /**
10
10
  * @typedef {function(index: number):(number|undefined)} VirtualListHelper~ItemHeightEstimatorFunction
@@ -221,7 +221,7 @@ class VirtualListHelper {
221
221
  const p = this._p;
222
222
  p.count = count;
223
223
 
224
- return this.invalidatePositions();
224
+ return this.invalidate();
225
225
  }
226
226
 
227
227
  /**
@@ -864,7 +864,7 @@ class VirtualListHelper {
864
864
  return undefined;
865
865
 
866
866
  const list = p.list;
867
- return Css.getElementOffset(itemEl).top - Css.getElementOffset(list).top + list.scrollTop;
867
+ return Css_js.getElementOffset(itemEl).top - Css_js.getElementOffset(list).top + list.scrollTop;
868
868
  }
869
869
  }
870
870
 
@@ -1216,10 +1216,10 @@ class VirtualListHelper {
1216
1216
  itemEl = p.itemElementCreatorFn();
1217
1217
 
1218
1218
  if (virtualWrapper && insertBefore !== false) {
1219
- ( /**@type ElementCSSInlineStyle*/itemEl).style.position = 'absolute';
1220
- ( /**@type ElementCSSInlineStyle*/itemEl).style.top = '0';
1221
- ( /**@type ElementCSSInlineStyle*/itemEl).style.left = '0';
1222
- ( /**@type ElementCSSInlineStyle*/itemEl).style.right = '0';
1219
+ (/**@type ElementCSSInlineStyle*/itemEl).style.position = 'absolute';
1220
+ (/**@type ElementCSSInlineStyle*/itemEl).style.top = '0';
1221
+ (/**@type ElementCSSInlineStyle*/itemEl).style.left = '0';
1222
+ (/**@type ElementCSSInlineStyle*/itemEl).style.right = '0';
1223
1223
  }
1224
1224
  }
1225
1225
 
@@ -1244,7 +1244,7 @@ class VirtualListHelper {
1244
1244
  }
1245
1245
 
1246
1246
  // Insert into existing list
1247
- let beforeIndex = insertBefore ? existingEls.indexOf( /**@type Element*/insertBefore) : -1;
1247
+ let beforeIndex = insertBefore ? existingEls.indexOf(/**@type Element*/insertBefore) : -1;
1248
1248
  if (beforeIndex === -1) {
1249
1249
  existingEls.push(itemEl);
1250
1250
  } else {
@@ -1305,9 +1305,9 @@ class VirtualListHelper {
1305
1305
  const supportedTransform = getSupportedTransform();
1306
1306
 
1307
1307
  if (supportedTransform === false) {
1308
- ( /**@type ElementCSSInlineStyle*/itemEl).style.top = `${pos}px`;
1308
+ (/**@type ElementCSSInlineStyle*/itemEl).style.top = `${pos}px`;
1309
1309
  } else {
1310
- ( /**@type ElementCSSInlineStyle*/itemEl).style[supportedTransform] = `translateY(${pos}px)`;
1310
+ (/**@type ElementCSSInlineStyle*/itemEl).style[supportedTransform] = `translateY(${pos}px)`;
1311
1311
  }
1312
1312
  }
1313
1313
  }