mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 22:29:11 -04:00
Implement new selection drawing mechanism.
Using the new Item#globalMatrix.
This commit is contained in:
parent
010209c70f
commit
93ede28f3b
4 changed files with 30 additions and 24 deletions
src/project
|
@ -272,10 +272,13 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
ctx.strokeWidth = 1;
|
||||
// TODO: use Layer#color
|
||||
ctx.strokeStyle = ctx.fillStyle = '#009dec';
|
||||
param = { selection: true };
|
||||
Base.each(this._selectedItems, function(item) {
|
||||
item.draw(ctx, param);
|
||||
});
|
||||
for (var id in this._selectedItems) {
|
||||
var item = this._selectedItems[id],
|
||||
mx = item.getGlobalMatrix();
|
||||
if (matrix)
|
||||
mx.preConcatenate(matrix);
|
||||
item.drawSelected(ctx, mx);
|
||||
}
|
||||
ctx.restore();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue