Skip to content

Commit 481b2e0

Browse files
committed
Handle scroll matrices correctly when drawing selections.
Closes paperjs#82.
1 parent 2218ca3 commit 481b2e0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/project/Project.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
278278
// matrices by item id, to speed up drawing by eliminating repeated
279279
// concatenation of parent's matrices through caching.
280280
var matrices = {};
281-
// Descriptionf of the paramters to getGlobalMatrix():
281+
// Description of the paramters to getGlobalMatrix():
282282
// mx is the container for the final concatenated matrix, passed
283283
// to getGlobalMatrix() on the initial call.
284284
// cached defines wether the result of the concatenation should be
@@ -309,7 +309,8 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
309309
}
310310
for (var id in this._selectedItems) {
311311
var item = this._selectedItems[id];
312-
item.drawSelected(ctx, getGlobalMatrix(item, matrix.clone()));
312+
item.drawSelected(ctx,
313+
getGlobalMatrix(item, new Matrix()).preConcatenate(matrix));
313314
}
314315
ctx.restore();
315316
}

0 commit comments

Comments
 (0)