Skip to content

Commit

Permalink
fix(polyline#_calcDimensions): remove options mutate
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Zappa committed Nov 1, 2022
1 parent 27a2f5e commit 5214ea8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/shapes/polyline.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ import { calcDimensionsMatrix, transformPoint } from '../util/misc/matrix';
}
const bbox = makeBoundingBoxFromPoints(points),
// Remove scale effect, since it's applied after
matrix = calcDimensionsMatrix(
Object.assign(options, { scaleX: 1, scaleY: 1 })
),
matrix = calcDimensionsMatrix({ ...options, scaleX: 1, scaleY: 1 }),
bboxNoStroke = makeBoundingBoxFromPoints(
this.points.map((p) => transformPoint(p, matrix, true))
),
Expand Down

0 comments on commit 5214ea8

Please sign in to comment.