|
|
@ -49,7 +49,7 @@ exports.stack = function(items, margin, force) { |
|
|
|
// calculate new, non-overlapping positions
|
|
|
|
for (i = 0, iMax = items.length; i < iMax; i++) { |
|
|
|
var item = items[i]; |
|
|
|
if (item.top === null) { |
|
|
|
if (item.stack && item.top === null) { |
|
|
|
// initialize top position
|
|
|
|
item.top = margin.axis; |
|
|
|
|
|
|
@ -59,7 +59,7 @@ exports.stack = function(items, margin, force) { |
|
|
|
var collidingItem = null; |
|
|
|
for (var j = 0, jj = items.length; j < jj; j++) { |
|
|
|
var other = items[j]; |
|
|
|
if (other.top !== null && other !== item && other.ignoreStacking == false && exports.collision(item, other, margin.item)) { |
|
|
|
if (other.top !== null && other !== item && other.stack && exports.collision(item, other, margin.item)) { |
|
|
|
collidingItem = other; |
|
|
|
break; |
|
|
|
} |
|
|
|