Skip to content
This repository has been archived by the owner on Dec 21, 2019. It is now read-only.

Commit

Permalink
Allow measurement of path without lines
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Jan 10, 2011
1 parent ddd0418 commit 67519f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/ART.Path.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ var extrapolate = function(parts, precision){
}
}

if (!boundsX.length) return [path, {left: 0, top: 0, right: 0, bottom: 0, width: 0, height: 0}];

var right = Math.max.apply(Math, boundsX),
bottom = Math.max.apply(Math, boundsY),
left = Math.min.apply(Math, boundsX),
Expand Down

0 comments on commit 67519f8

Please sign in to comment.