mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Make #drawSelected() protected.
This commit is contained in:
parent
517b2ee27f
commit
2e265693ff
2 changed files with 6 additions and 4 deletions
|
@ -1876,7 +1876,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
}
|
||||
},
|
||||
|
||||
drawSelected: function(ctx, matrix) {
|
||||
_drawSelected: function(ctx, matrix) {
|
||||
ctx.beginPath();
|
||||
drawSegments(ctx, this, matrix);
|
||||
// Now stroke it and draw its handles:
|
||||
|
|
|
@ -313,15 +313,17 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
for (var id in this._selectedItems) {
|
||||
var item = this._selectedItems[id];
|
||||
if (item._drawCount === this._drawCount
|
||||
&& (item.drawSelected || item._boundsSelected)) {
|
||||
&& (item._drawSelected || item._boundsSelected)) {
|
||||
var mx = item._globalMatrix;
|
||||
if (item.drawSelected)
|
||||
item.drawSelected(ctx, mx);
|
||||
if (item._drawSelected)
|
||||
item._drawSelected(ctx, mx);
|
||||
if (item._boundsSelected) {
|
||||
// We need to call the internal _getBounds, to get non-
|
||||
// transformed bounds.
|
||||
var coords = mx._transformCorners(
|
||||
item._getBounds('getBounds'));
|
||||
// Now draw a rectangle that connects the transformed
|
||||
// bounds corners, and draw the corners.
|
||||
ctx.beginPath();
|
||||
for (var i = 0; i < 8; i++)
|
||||
ctx[i === 0 ? 'moveTo' : 'lineTo'](
|
||||
|
|
Loading…
Reference in a new issue