mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add mouse hovering to StrokeBounds example.
This commit is contained in:
parent
40f2547e5f
commit
6d751fc466
1 changed files with 7 additions and 0 deletions
|
@ -83,6 +83,13 @@
|
||||||
rect.strokeWidth = 0.25;
|
rect.strokeWidth = 0.25;
|
||||||
rect.strokeColor = 'green';
|
rect.strokeColor = 'green';
|
||||||
rect.fillColor = null;
|
rect.fillColor = null;
|
||||||
|
|
||||||
|
path.onMouseEnter = function() {
|
||||||
|
this.strokeColor = 'red';
|
||||||
|
}
|
||||||
|
path.onMouseLeave = function() {
|
||||||
|
this.strokeColor = 'black';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project.activeLayer.position = view.center;
|
project.activeLayer.position = view.center;
|
||||||
|
|
Loading…
Reference in a new issue