From c0e6d5b2eebf7e592d35b83ec8030366fb68f07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 16 Nov 2011 22:54:03 +0100 Subject: [PATCH] Remove unused injection scopes. --- src/ui/KeyEvent.js | 72 +++++++++++++++++++++----------------------- src/ui/MouseEvent.js | 36 +++++++++++----------- 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/src/ui/KeyEvent.js b/src/ui/KeyEvent.js index bf7cb02c..dddc710f 100644 --- a/src/ui/KeyEvent.js +++ b/src/ui/KeyEvent.js @@ -24,45 +24,43 @@ * * @extends Event */ -var KeyEvent = this.KeyEvent = Event.extend(new function() { - return /** @lends KeyEvent# */{ - initialize: function(down, key, character, event) { - this.base(event); - this.type = down ? 'keydown' : 'keyup'; - this.key = key; - this.character = character; - }, +var KeyEvent = this.KeyEvent = Event.extend(/** @lends KeyEvent# */{ + initialize: function(down, key, character, event) { + this.base(event); + this.type = down ? 'keydown' : 'keyup'; + this.key = key; + this.character = character; + }, - /** - * The type of key event. - * - * @name KeyEvent#type - * @type String('keydown', 'keyup') - */ + /** + * The type of key event. + * + * @name KeyEvent#type + * @type String('keydown', 'keyup') + */ - /** - * The string character of the key that caused this key event. - * - * @name KeyEvent#character - * @type String - */ + /** + * The string character of the key that caused this key event. + * + * @name KeyEvent#character + * @type String + */ - /** - * The key that caused this key event. - * - * @name KeyEvent#key - * @type String - */ + /** + * The key that caused this key event. + * + * @name KeyEvent#key + * @type String + */ - /** - * @return {String} A string representation of the key event. - */ - toString: function() { - return '{ type: ' + this.type - + ', key: ' + this.key - + ', character: ' + this.character - + ', modifiers: ' + this.getModifiers() - + ' }'; - } - }; + /** + * @return {String} A string representation of the key event. + */ + toString: function() { + return '{ type: ' + this.type + + ', key: ' + this.key + + ', character: ' + this.character + + ', modifiers: ' + this.getModifiers() + + ' }'; + } }); diff --git a/src/ui/MouseEvent.js b/src/ui/MouseEvent.js index 6e23b8e1..dc8031e9 100644 --- a/src/ui/MouseEvent.js +++ b/src/ui/MouseEvent.js @@ -19,24 +19,22 @@ * * @extends Event */ -var MouseEvent = this.MouseEvent = Event.extend(new function() { - return /** @lends MouseEvent# */{ - initialize: function(type, point, target, event) { - this.base(event); - this.type = type; - this.point = point; - this.target = target; - }, +var MouseEvent = this.MouseEvent = Event.extend(/** @lends MouseEvent# */{ + initialize: function(type, point, target, event) { + this.base(event); + this.type = type; + this.point = point; + this.target = target; + }, - /** - * @return {String} A string representation of the key event. - */ - toString: function() { - return '{ type: ' + this.type - + ', point: ' + this.point - + ', target: ' + this.target - + ', modifiers: ' + this.getModifiers() - + ' }'; - } - }; + /** + * @return {String} A string representation of the key event. + */ + toString: function() { + return '{ type: ' + this.type + + ', point: ' + this.point + + ', target: ' + this.target + + ', modifiers: ' + this.getModifiers() + + ' }'; + } });