Implement caching of internal, untransformed bounds.

This commit is contained in:
Jürg Lehni 2013-12-09 10:53:19 +01:00
parent 5197dd81c5
commit e238d23194
4 changed files with 28 additions and 24 deletions
src/project

View file

@ -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();