diff options
author | Eric Guzman | 2012-02-16 14:20:40 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-16 14:20:40 -0800 |
commit | 6960f62a84b946c92a59e5f5dc537a818f9f62b8 (patch) | |
tree | 49cbff3fdd8dab11846e5a278406915ec0ec1508 /node_modules/montage/core/event | |
parent | 82b1a273219f0ae3d119e156c7acccdbe478f441 (diff) | |
parent | 81942bd52f0713c9ff5d479ebd12fce577f45e45 (diff) | |
download | ninja-6960f62a84b946c92a59e5f5dc537a818f9f62b8.tar.gz |
Merge branch 'refs/heads/master' into PresetsPanel
Diffstat (limited to 'node_modules/montage/core/event')
-rwxr-xr-x | node_modules/montage/core/event/binding.js | 8 | ||||
-rwxr-xr-x | node_modules/montage/core/event/event-manager.js | 5 | ||||
-rwxr-xr-x | node_modules/montage/core/event/mutable-event.js | 1 |
3 files changed, 7 insertions, 7 deletions
diff --git a/node_modules/montage/core/event/binding.js b/node_modules/montage/core/event/binding.js index f061e89a..21b40609 100755 --- a/node_modules/montage/core/event/binding.js +++ b/node_modules/montage/core/event/binding.js | |||
@@ -19,7 +19,9 @@ var Montage = require("montage").Montage, | |||
19 | Serializer = require("core/serializer").Serializer, | 19 | Serializer = require("core/serializer").Serializer, |
20 | Deserializer = require("core/deserializer").Deserializer, | 20 | Deserializer = require("core/deserializer").Deserializer, |
21 | defaultEventManager = require("core/event/event-manager").defaultEventManager, | 21 | defaultEventManager = require("core/event/event-manager").defaultEventManager, |
22 | AT_TARGET = 2; | 22 | AT_TARGET = 2, |
23 | UNDERSCORE = "_"; | ||
24 | |||
23 | 25 | ||
24 | /** | 26 | /** |
25 | @member external:Array#dispatchChangeEvent | 27 | @member external:Array#dispatchChangeEvent |
@@ -918,7 +920,7 @@ Object.defineProperty(Object.prototype, "addEventListener", { | |||
918 | if ("value" in currentPropertyDescriptor) { | 920 | if ("value" in currentPropertyDescriptor) { |
919 | 921 | ||
920 | //Create internal storage: | 922 | //Create internal storage: |
921 | Object.defineProperty(currentObject, (internalStorageProperty = "_" + key), { | 923 | Object.defineProperty(currentObject, (internalStorageProperty = UNDERSCORE + key), { |
922 | value: currentObject.getProperty(key), | 924 | value: currentObject.getProperty(key), |
923 | configurable: true, | 925 | configurable: true, |
924 | writable: true | 926 | writable: true |
@@ -1009,7 +1011,7 @@ Object.defineProperty(Object.prototype, "addEventListener", { | |||
1009 | //TODO this is all duplicated from above, clean it up | 1011 | //TODO this is all duplicated from above, clean it up |
1010 | 1012 | ||
1011 | //Create internal storage: | 1013 | //Create internal storage: |
1012 | Object.defineProperty(currentObject, (internalStorageProperty = "_" + key), { | 1014 | Object.defineProperty(currentObject, (internalStorageProperty = UNDERSCORE + key), { |
1013 | value: currentObject.getProperty(key), | 1015 | value: currentObject.getProperty(key), |
1014 | configurable: true, | 1016 | configurable: true, |
1015 | writable: true | 1017 | writable: true |
diff --git a/node_modules/montage/core/event/event-manager.js b/node_modules/montage/core/event/event-manager.js index b3e97dbe..bef8a67c 100755 --- a/node_modules/montage/core/event/event-manager.js +++ b/node_modules/montage/core/event/event-manager.js | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | var Montage = require("montage").Montage, | 20 | var Montage = require("montage").Montage, |
21 | MutableEvent = require("core/event/mutable-event").MutableEvent, | 21 | MutableEvent = require("core/event/mutable-event").MutableEvent, |
22 | ActionEventListener = require("core/event/action-event-listener").ActionEventListener, | ||
23 | Serializer = require("core/serializer").Serializer, | 22 | Serializer = require("core/serializer").Serializer, |
24 | Deserializer = require("core/deserializer").Deserializer, | 23 | Deserializer = require("core/deserializer").Deserializer, |
25 | defaultEventManager; | 24 | defaultEventManager; |
@@ -28,9 +27,7 @@ var Montage = require("montage").Montage, | |||
28 | if (typeof window !== "undefined") { // client-side | 27 | if (typeof window !== "undefined") { // client-side |
29 | 28 | ||
30 | /* This is to handle browsers that have TouchEvents but don't have the global constructor function Touch */ | 29 | /* This is to handle browsers that have TouchEvents but don't have the global constructor function Touch */ |
31 | //if(TouchEvent && typeof window.Touch === "undefined") { | 30 | if (typeof window.Touch === "undefined" && "ontouchstart" in window) { |
32 | // HACK: The commented expression fails because Chrome on the desktop also has TouchEvent and in the code we're either registering touch events OR mouse events on most components. | ||
33 | if (typeof window.Touch === "undefined" && /Xoom|TouchPad/.test(navigator.userAgent)) { | ||
34 | window.Touch = function() { | 31 | window.Touch = function() { |
35 | }; | 32 | }; |
36 | (function() { | 33 | (function() { |
diff --git a/node_modules/montage/core/event/mutable-event.js b/node_modules/montage/core/event/mutable-event.js index f94ee0b9..6f6a0cfd 100755 --- a/node_modules/montage/core/event/mutable-event.js +++ b/node_modules/montage/core/event/mutable-event.js | |||
@@ -105,6 +105,7 @@ var MutableEvent = exports.MutableEvent = Montage.create(Montage,/** @lends modu | |||
105 | var changeEvent = new _changeEventConstructor(); | 105 | var changeEvent = new _changeEventConstructor(); |
106 | changeEvent.type = "change@" + key; | 106 | changeEvent.type = "change@" + key; |
107 | changeEvent.minus = minus; | 107 | changeEvent.minus = minus; |
108 | changeEvent.plus = undefined; | ||
108 | changeEvent.propertyChange = ChangeTypes.MODIFICATION; | 109 | changeEvent.propertyChange = ChangeTypes.MODIFICATION; |
109 | return changeEvent; | 110 | return changeEvent; |
110 | } | 111 | } |