Skip to content

Commit

Permalink
Update rect.class.js - fix issue with incorrect <rect> tags in SVG (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amitchell0560 authored and asturur committed Mar 24, 2019
1 parent 35c2c3b commit b538562
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/shapes/rect.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@

parsedAttributes.left = parsedAttributes.left || 0;
parsedAttributes.top = parsedAttributes.top || 0;
parsedAttributes.height = parsedAttributes.height || 0;
parsedAttributes.width = parsedAttributes.width || 0;
var rect = new fabric.Rect(extend((options ? fabric.util.object.clone(options) : { }), parsedAttributes));
rect.visible = rect.visible && rect.width > 0 && rect.height > 0;
callback(rect);
Expand Down

0 comments on commit b538562

Please sign in to comment.