mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-14 06:59:06 -04:00
Implement caching of internal, untransformed bounds.
This commit is contained in:
parent
5197dd81c5
commit
e238d23194
4 changed files with 28 additions and 24 deletions
src/project
|
@ -462,11 +462,8 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
if (item._drawSelected)
|
||||
item._drawSelected(ctx, mx);
|
||||
if (item._boundsSelected) {
|
||||
// We need to call the internal _getBounds, to get non-
|
||||
// transformed bounds.
|
||||
// TODO: Implement caching for these too?
|
||||
var coords = mx._transformCorners(
|
||||
item._getBounds('getBounds'));
|
||||
item.getInternalBounds());
|
||||
// Now draw a rectangle that connects the transformed
|
||||
// bounds corners, and draw the corners.
|
||||
ctx.beginPath();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue