Fix arguments check in Path#getHandleBounds().

This commit is contained in:
Jürg Lehni 2011-11-23 18:13:05 +01:00
parent 11f298c994
commit cd1810e6a3

View file

@ -2030,11 +2030,14 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
* @ignore
*/
getHandleBounds: function(/* matrix, stroke, join */) {
var matrix = arguments[0],
useCache = matrix === undefined;
// Do not check for matrix but count parameters to determine if we
// can cache or not, as the other parameters have an influence on
// that too:
var useCache = arguments.length == 0;
if (useCache && this._handleBounds)
return this._handleBounds;
var coords = new Array(6),
matrix = arguments[0],
stroke = arguments[1] / 2 || 0, // Stroke padding
join = arguments[2] / 2 || 0, // Join padding, for miterLimit
open = !this._closed,