Skip to content

Commit

Permalink
Fix bug in box.transform()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbol99 committed Jul 25, 2023
1 parent a91f800 commit f883ecc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/main.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6253,7 +6253,7 @@ class Box extends Shape {
transform(m = new Flatten.Matrix()) {
const transformed_points = this.toPoints().map(pt => pt.transform(m));
return transformed_points.reduce(
(new_box, pt) => new_box.merge(pt), new Box())
(new_box, pt) => new_box.merge(pt.box), new Box())
}

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/main.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6249,7 +6249,7 @@ class Box extends Shape {
transform(m = new Flatten.Matrix()) {
const transformed_points = this.toPoints().map(pt => pt.transform(m));
return transformed_points.reduce(
(new_box, pt) => new_box.merge(pt), new Box())
(new_box, pt) => new_box.merge(pt.box), new Box())
}

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/main.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -6255,7 +6255,7 @@
transform(m = new Flatten.Matrix()) {
const transformed_points = this.toPoints().map(pt => pt.transform(m));
return transformed_points.reduce(
(new_box, pt) => new_box.merge(pt), new Box())
(new_box, pt) => new_box.merge(pt.box), new Box())
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/classes/box.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class Box extends Shape {
transform(m = new Flatten.Matrix()) {
const transformed_points = this.toPoints().map(pt => pt.transform(m))
return transformed_points.reduce(
(new_box, pt) => new_box.merge(pt), new Box())
(new_box, pt) => new_box.merge(pt.box), new Box())
}

/**
Expand Down

0 comments on commit f883ecc

Please sign in to comment.