Fix Path#getStrokeBounds: use Path#getBounds when no strokeColor or strokeWidth are set.

This commit is contained in:
Jonathan Puckey 2011-05-18 20:08:10 +02:00
parent 0ab9e38068
commit b4807b9b7c

View file

@ -1101,6 +1101,8 @@ var Path = this.Path = PathItem.extend({
* The bounding rectangle of the item including stroke width.
*/
getStrokeBounds: function(/* matrix */) {
if (!this.style._strokeColor || !this.style._strokeWidth)
return this.getBounds();
var useCache = arguments.length == 0;
if (this._strokeBounds && useCache)
return this._strokeBounds;