mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-29 23:29:06 -04:00
Implement MouseEvent#delta for Item#onMouseDrag and #onMouseMove.
This commit is contained in:
parent
cf54b1a7c1
commit
1b484a2f7b
2 changed files with 38 additions and 14 deletions
src/ui
|
@ -20,11 +20,12 @@
|
|||
* @extends Event
|
||||
*/
|
||||
var MouseEvent = this.MouseEvent = Event.extend(/** @lends MouseEvent# */{
|
||||
initialize: function(type, event, point, target) {
|
||||
initialize: function(type, event, point, target, delta) {
|
||||
this.base(event);
|
||||
this.type = type;
|
||||
this.point = point;
|
||||
this.target = target;
|
||||
this.delta = delta;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -34,6 +35,7 @@ var MouseEvent = this.MouseEvent = Event.extend(/** @lends MouseEvent# */{
|
|||
return '{ type: ' + this.type
|
||||
+ ', point: ' + this.point
|
||||
+ ', target: ' + this.target
|
||||
+ (this.delta ? ', delta: ' + this.delta : '')
|
||||
+ ', modifiers: ' + this.getModifiers()
|
||||
+ ' }';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue