Skip to content

Commit

Permalink
Check all constraints when stacking
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Aug 6, 2017
1 parent d49723d commit 699574b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VolumePacker.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ protected function tryAndStackItemsIntoSpace(
$maxLength,
$maxDepth
) {
while (!$this->items->isEmpty() && $this->remainingWeight >= $this->items->top()->getWeight()) {
while (!$this->items->isEmpty() && $this->checkNonDimensionalConstraints($this->items->top(), $packedItems)) {
$stackedItem = $this->getOrientationForItem(
$this->items->top(),
$prevItem,
Expand Down

0 comments on commit 699574b

Please sign in to comment.