Skip to content

Commit

Permalink
Fix SVG's rect
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Nov 5, 2017
1 parent f6357a0 commit 351e911
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/canvas/view/CanvasView.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,10 @@ module.exports = Backbone.View.extend({
return {
top,
left,
height: el.offsetHeight,
width: el.offsetWidth

// clientHeight/clientWidth are for SVGs
height: el.offsetHeight || el.clientHeight,
width: el.offsetWidth || el.clientWidth,
};
},

Expand Down

0 comments on commit 351e911

Please sign in to comment.