Skip to content

Commit

Permalink
fix(maxrects-bin.ts): split freerect not use rotated node
Browse files Browse the repository at this point in the history
  • Loading branch information
soimy committed Jun 18, 2019
1 parent 7f39659 commit 5f06524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/maxrects-bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class MaxRectsBin<T extends IRectangle = Rectangle> extends Bin<T> {
if (r.width >= height && r.height >= width) {
areaFit = r.width * r.height - height * width;
if (areaFit < score) {
bestNode = new Rectangle(width, height, r.x, r.y, true); // Rotated node
bestNode = new Rectangle(height, width, r.x, r.y, true); // Rotated node
score = areaFit;
}
}
Expand Down

0 comments on commit 5f06524

Please sign in to comment.