Skip to content

Commit

Permalink
Merge pull request #748 from ecomfe/fix/bounding-rect
Browse files Browse the repository at this point in the history
fix(BoundingRect): don't check if the width and height is finite in constructor.
  • Loading branch information
pissang authored Apr 18, 2021
2 parents 06479d6 + 06cb4c4 commit c22d56a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/BoundingRect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class BoundingRect {
height: number

constructor(x: number, y: number, width: number, height: number) {
if (width < 0 && isFinite(width)) {
if (width < 0) {
x = x + width;
width = -width;
}
if (height < 0 && isFinite(height)) {
if (height < 0) {
y = y + height;
height = -height;
}
Expand Down

0 comments on commit c22d56a

Please sign in to comment.