mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Remove unused injection scopes.
This commit is contained in:
parent
44bf596e51
commit
c0e6d5b2ee
2 changed files with 52 additions and 56 deletions
|
@ -24,45 +24,43 @@
|
||||||
*
|
*
|
||||||
* @extends Event
|
* @extends Event
|
||||||
*/
|
*/
|
||||||
var KeyEvent = this.KeyEvent = Event.extend(new function() {
|
var KeyEvent = this.KeyEvent = Event.extend(/** @lends KeyEvent# */{
|
||||||
return /** @lends KeyEvent# */{
|
initialize: function(down, key, character, event) {
|
||||||
initialize: function(down, key, character, event) {
|
this.base(event);
|
||||||
this.base(event);
|
this.type = down ? 'keydown' : 'keyup';
|
||||||
this.type = down ? 'keydown' : 'keyup';
|
this.key = key;
|
||||||
this.key = key;
|
this.character = character;
|
||||||
this.character = character;
|
},
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of key event.
|
* The type of key event.
|
||||||
*
|
*
|
||||||
* @name KeyEvent#type
|
* @name KeyEvent#type
|
||||||
* @type String('keydown', 'keyup')
|
* @type String('keydown', 'keyup')
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The string character of the key that caused this key event.
|
* The string character of the key that caused this key event.
|
||||||
*
|
*
|
||||||
* @name KeyEvent#character
|
* @name KeyEvent#character
|
||||||
* @type String
|
* @type String
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The key that caused this key event.
|
* The key that caused this key event.
|
||||||
*
|
*
|
||||||
* @name KeyEvent#key
|
* @name KeyEvent#key
|
||||||
* @type String
|
* @type String
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {String} A string representation of the key event.
|
* @return {String} A string representation of the key event.
|
||||||
*/
|
*/
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return '{ type: ' + this.type
|
return '{ type: ' + this.type
|
||||||
+ ', key: ' + this.key
|
+ ', key: ' + this.key
|
||||||
+ ', character: ' + this.character
|
+ ', character: ' + this.character
|
||||||
+ ', modifiers: ' + this.getModifiers()
|
+ ', modifiers: ' + this.getModifiers()
|
||||||
+ ' }';
|
+ ' }';
|
||||||
}
|
}
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,24 +19,22 @@
|
||||||
*
|
*
|
||||||
* @extends Event
|
* @extends Event
|
||||||
*/
|
*/
|
||||||
var MouseEvent = this.MouseEvent = Event.extend(new function() {
|
var MouseEvent = this.MouseEvent = Event.extend(/** @lends MouseEvent# */{
|
||||||
return /** @lends MouseEvent# */{
|
initialize: function(type, point, target, event) {
|
||||||
initialize: function(type, point, target, event) {
|
this.base(event);
|
||||||
this.base(event);
|
this.type = type;
|
||||||
this.type = type;
|
this.point = point;
|
||||||
this.point = point;
|
this.target = target;
|
||||||
this.target = target;
|
},
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {String} A string representation of the key event.
|
* @return {String} A string representation of the key event.
|
||||||
*/
|
*/
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return '{ type: ' + this.type
|
return '{ type: ' + this.type
|
||||||
+ ', point: ' + this.point
|
+ ', point: ' + this.point
|
||||||
+ ', target: ' + this.target
|
+ ', target: ' + this.target
|
||||||
+ ', modifiers: ' + this.getModifiers()
|
+ ', modifiers: ' + this.getModifiers()
|
||||||
+ ' }';
|
+ ' }';
|
||||||
}
|
}
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue