@plcmp/pl-virtual-scroll 0.1.3 → 0.1.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plcmp/pl-virtual-scroll",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Component for lazy list render.",
5
5
  "main": "pl-virtual-scroll.js",
6
6
  "repository": {
@@ -165,7 +165,7 @@ class PlVirtualScroll extends PlElement {
165
165
 
166
166
  unused.forEach(u => {
167
167
  u.index = null;
168
- u.ctx._ti._nodes.forEach(i => { if (i.style) i.style.transform = `translateY(-100%)`; });
168
+ u.ctx._ti._nodes.forEach(i => { if (i.style) i.style.transform = `translateY(-1000px)`; });
169
169
  });
170
170
 
171
171
  // fill .5 height window in background
@@ -174,9 +174,9 @@ class PlVirtualScroll extends PlElement {
174
174
 
175
175
 
176
176
  if (this.elementHeight && this.items.length)
177
- canvas.style.setProperty('height', this.elementHeight * this.items.length + 'px')
177
+ canvas.style.setProperty('max-height', this.elementHeight * this.items.length + 'px')
178
178
  else
179
- canvas.style.setProperty('height', 0)
179
+ canvas.style.setProperty('max-height', 0)
180
180
  }
181
181
 
182
182
  /**