Skip to content

Commit

Permalink
better svg options
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Oct 15, 2022
1 parent 41d777e commit f158267
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/shapes/polyline.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,16 @@ import { degreesToRadians } from '../util/misc/radiansDegreesConversion';
return callback(null);
}
const points = parsePointsAttribute(element.getAttribute('points')),
parsedAttributes = parseAttributes(
// we omit left and top to instruct the constructor to position the object using the bbox
// eslint-disable-next-line @typescript-eslint/no-unused-vars
{ left, top, ...parsedAttributes } = parseAttributes(
element,
fabric[_class].ATTRIBUTE_NAMES
);
callback(
new fabric[_class](points, {
...parsedAttributes,
...options,
// we pass undefined to instruct the constructor to position the object using the bbox
left: undefined,
top: undefined,
fromSVG: true,
})
);
Expand Down

0 comments on commit f158267

Please sign in to comment.