mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-07 19:49:09 -04:00
Implement Item#onMouseEnter / #onMouseLeave.
This commit is contained in:
parent
c0e6d5b2ee
commit
b3bf57c8e9
2 changed files with 23 additions and 15 deletions
src/ui
|
@ -36,5 +36,18 @@ var MouseEvent = this.MouseEvent = Event.extend(/** @lends MouseEvent# */{
|
|||
+ ', target: ' + this.target
|
||||
+ ', modifiers: ' + this.getModifiers()
|
||||
+ ' }';
|
||||
},
|
||||
|
||||
// TODO: Move to Event perhaps?
|
||||
_call: function(bubble) {
|
||||
var item = this.target,
|
||||
called = false;
|
||||
while (item) {
|
||||
called = item.fire(this.type, this) || called;
|
||||
if (called && (!bubble || this._stopped))
|
||||
break;
|
||||
item = item.getParent();
|
||||
}
|
||||
return called;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue