From b4807b9b7c94359a947bd53c736b9727360c8014 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Wed, 18 May 2011 20:08:10 +0200 Subject: [PATCH] Fix Path#getStrokeBounds: use Path#getBounds when no strokeColor or strokeWidth are set. --- src/path/Path.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/path/Path.js b/src/path/Path.js index dde369da..e5af60be 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -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;