2011-11-12 17:57:25 -05:00
|
|
|
/*
|
|
|
|
* Paper.js
|
|
|
|
*
|
|
|
|
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
|
|
|
|
* based on Scriptographer.org and designed to be largely API compatible.
|
|
|
|
* http://paperjs.org/
|
|
|
|
* http://scriptographer.org/
|
|
|
|
*
|
|
|
|
* Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
|
|
|
|
* http://lehni.org/ & http://jonathanpuckey.com/
|
|
|
|
*
|
|
|
|
* Distributed under the MIT license. See LICENSE file for details.
|
|
|
|
*
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name MouseEvent
|
|
|
|
*
|
|
|
|
* @extends Event
|
|
|
|
*/
|
2011-11-16 16:54:03 -05:00
|
|
|
var MouseEvent = this.MouseEvent = Event.extend(/** @lends MouseEvent# */{
|
2011-11-16 18:04:30 -05:00
|
|
|
initialize: function(type, event, point, target, delta) {
|
2011-11-16 16:54:03 -05:00
|
|
|
this.base(event);
|
|
|
|
this.type = type;
|
|
|
|
this.point = point;
|
|
|
|
this.target = target;
|
2011-11-16 18:04:30 -05:00
|
|
|
this.delta = delta;
|
2011-11-16 16:54:03 -05:00
|
|
|
},
|
2011-11-12 17:57:25 -05:00
|
|
|
|
2011-11-16 16:54:03 -05:00
|
|
|
/**
|
|
|
|
* @return {String} A string representation of the key event.
|
|
|
|
*/
|
|
|
|
toString: function() {
|
|
|
|
return '{ type: ' + this.type
|
|
|
|
+ ', point: ' + this.point
|
|
|
|
+ ', target: ' + this.target
|
2011-11-16 18:04:30 -05:00
|
|
|
+ (this.delta ? ', delta: ' + this.delta : '')
|
2011-11-16 16:54:03 -05:00
|
|
|
+ ', modifiers: ' + this.getModifiers()
|
|
|
|
+ ' }';
|
|
|
|
}
|
2011-11-12 17:57:25 -05:00
|
|
|
});
|