dynamic-marquee
Advanced tools
Comparing version 2.3.8 to 2.3.9
@@ -684,2 +684,13 @@ (function (global, factory) { | ||
var nextItemTouching = null; | ||
// calculate what the new offsets should be given item sizes may have changed | ||
_this6._items.reduce(function (newOffset, item) { | ||
if (newOffset !== null && item.offset < newOffset) { | ||
// the size of the item before has increased and would now be overlapping | ||
// this one, so shuffle this one along. | ||
item.offset = newOffset; | ||
} | ||
item.item.setOffset(item.offset); | ||
return item.offset + item.item.getSize(); | ||
}, null); | ||
if (_this6._pendingItem) { | ||
@@ -711,3 +722,3 @@ _this6._$moving.appendChild(_this6._pendingItem.getContainer()); | ||
var _touching = _this6._rate <= 0 ? lastItem : firstItem; | ||
if (_this6._rate <= 0 && lastItem.offset + _touching.item.getSize() - _this6._windowOffset <= containerSize + buffer || _this6._rate > 0 && _touching.offset - _this6._windowOffset > -1 * buffer) { | ||
if (_this6._rate <= 0 && lastItem.offset + lastItem.item.getSize() - _this6._windowOffset <= containerSize + buffer || _this6._rate > 0 && firstItem.offset - _this6._windowOffset > -1 * buffer) { | ||
_this6._waitingForItem = requireNewItem = true; | ||
@@ -739,9 +750,2 @@ // if an item is appended immediately below, it would be considered touching | ||
} | ||
_this6._items.reduce(function (newOffset, item) { | ||
if (newOffset !== null) { | ||
item.offset = newOffset; | ||
} | ||
item.item.setOffset(item.offset); | ||
return item.offset + item.item.getSize(); | ||
}, null); | ||
_this6._updateWindowInverseSize(); | ||
@@ -748,0 +752,0 @@ if (requireNewItem) { |
{ | ||
"name": "dynamic-marquee", | ||
"version": "2.3.8", | ||
"version": "2.3.9", | ||
"description": "A small library for creating marquees.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/dynamic-marquee.js", |
51756
894