mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Have #_getCachedBounds() return clones of cached items again.
Fixes issue with Tadpoles example.
This commit is contained in:
parent
cd58162dd5
commit
293294a55a
1 changed files with 3 additions and 3 deletions
|
@ -652,7 +652,7 @@ var Item = this.Item = Base.extend(Callback, {
|
||||||
bounds.x, bounds.y, bounds.width, bounds.height)
|
bounds.x, bounds.y, bounds.width, bounds.height)
|
||||||
// Return a clone of the cahce, so modifications won't
|
// Return a clone of the cahce, so modifications won't
|
||||||
// affect it.
|
// affect it.
|
||||||
: bounds.clone();
|
: bounds;
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/** @lends Item# */{
|
/** @lends Item# */{
|
||||||
|
@ -692,7 +692,7 @@ var Item = this.Item = Base.extend(Callback, {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cache && this._bounds && this._bounds[cache])
|
if (cache && this._bounds && this._bounds[cache])
|
||||||
return this._bounds[cache];
|
return this._bounds[cache].clone();
|
||||||
// If the result of concatinating the passed matrix with our internal
|
// If the result of concatinating the passed matrix with our internal
|
||||||
// one is an identity transformation, set it to null for faster
|
// one is an identity transformation, set it to null for faster
|
||||||
// processing
|
// processing
|
||||||
|
@ -708,7 +708,7 @@ var Item = this.Item = Base.extend(Callback, {
|
||||||
if (cache) {
|
if (cache) {
|
||||||
if (!this._bounds)
|
if (!this._bounds)
|
||||||
this._bounds = {};
|
this._bounds = {};
|
||||||
this._bounds[cache] = bounds;
|
this._bounds[cache] = bounds.clone();
|
||||||
}
|
}
|
||||||
return bounds;
|
return bounds;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue