aboutsummaryrefslogtreecommitdiff
path: root/node_modules
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules')
-rwxr-xr-xnode_modules/montage/core/event/binding.js110
1 files changed, 55 insertions, 55 deletions
diff --git a/node_modules/montage/core/event/binding.js b/node_modules/montage/core/event/binding.js
index 4091fe6a..c31ee7f9 100755
--- a/node_modules/montage/core/event/binding.js
+++ b/node_modules/montage/core/event/binding.js
@@ -5,13 +5,13 @@
5 </copyright> */ 5 </copyright> */
6 6
7/** 7/**
8 @module montage/core/event/binding 8 @module montage/core/event/binding
9 @requires montage/core/core 9 @requires montage/core/core
10 @requires montage/core/event/mutable-event 10 @requires montage/core/event/mutable-event
11 @requires montage/core/serializer 11 @requires montage/core/serializer
12 @requires montage/core/deserializer 12 @requires montage/core/deserializer
13 @requires montage/core/event/event-manager 13 @requires montage/core/event/event-manager
14 */ 14*/
15 15
16var Montage = require("montage").Montage, 16var Montage = require("montage").Montage,
17 ChangeNotification = require("core/change-notification").ChangeNotification, 17 ChangeNotification = require("core/change-notification").ChangeNotification,
@@ -23,14 +23,14 @@ var Montage = require("montage").Montage,
23 UNDERSCORE = "_"; 23 UNDERSCORE = "_";
24 24
25/** 25/**
26 @class module:montage/core/event/binding.ChangeEventDispatchingArray 26 @class module:montage/core/event/binding.ChangeEventDispatchingArray
27 */ 27*/
28var ChangeEventDispatchingArray = exports.ChangeEventDispatchingArray = []; 28var ChangeEventDispatchingArray = exports.ChangeEventDispatchingArray = [];
29 29
30/** 30/**
31 @class module:montage/core/event/binding.PropertyChangeBindingListener 31 @class module:montage/core/event/binding.PropertyChangeBindingListener
32 @extends module:montage/core/core.Montage 32 @extends module:montage/core/core.Montage
33 */ 33*/
34var PropertyChangeBindingListener = exports.PropertyChangeBindingListener = Object.create(Montage, /** module:montage/core/event/binding.PropertyChangeBindingListener# */ { 34var PropertyChangeBindingListener = exports.PropertyChangeBindingListener = Object.create(Montage, /** module:montage/core/event/binding.PropertyChangeBindingListener# */ {
35 35
36 useCapture: {value:false, writable: true}, 36 useCapture: {value:false, writable: true},
@@ -86,11 +86,11 @@ var PropertyChangeBindingListener = exports.PropertyChangeBindingListener = Obje
86 value:function (notification) { 86 value:function (notification) {
87 87
88 var bindingOriginTriggeredChange, 88 var bindingOriginTriggeredChange,
89 // Left 89 // Left
90 bindingOrigin = this.bindingOrigin, 90 bindingOrigin = this.bindingOrigin,
91 bindingOriginPropertyPath = this.bindingPropertyPath, 91 bindingOriginPropertyPath = this.bindingPropertyPath,
92 bindingOriginValue = bindingOrigin.getProperty(bindingOriginPropertyPath), 92 bindingOriginValue = bindingOrigin.getProperty(bindingOriginPropertyPath),
93 // Right 93 // Right
94 boundObject = this.target, 94 boundObject = this.target,
95 boundObjectPropertyPath = this.targetPropertyPath, 95 boundObjectPropertyPath = this.targetPropertyPath,
96 boundObjectValue; 96 boundObjectValue;
@@ -162,14 +162,14 @@ var PropertyChangeBindingListener = exports.PropertyChangeBindingListener = Obje
162}); 162});
163 163
164/** 164/**
165 @function external:Object#propertyChangeBindingListener 165 @function external:Object#propertyChangeBindingListener
166 @param {string} type The event type to listen for. 166 @param {string} type The event type to listen for.
167 @param {function} listener The event listener object. 167 @param {function} listener The event listener object.
168 @param {boolean} useCapture Specifies whether to listen for the property change during the capture or bubble event phases. 168 @param {boolean} useCapture Specifies whether to listen for the property change during the capture or bubble event phases.
169 @param {object} bindingOrigin The source of the binding. 169 @param {object} bindingOrigin The source of the binding.
170 @param {string} bindingPropertyPath The key path of the property on the source object. 170 @param {string} bindingPropertyPath The key path of the property on the source object.
171 @param {object} bindingDescriptor A property descriptor object that specifies the bound object and the bound object property path. 171 @param {object} bindingDescriptor A property descriptor object that specifies the bound object and the bound object property path.
172 */ 172*/
173Object.defineProperty(Object.prototype, "propertyChangeBindingListener", { 173Object.defineProperty(Object.prototype, "propertyChangeBindingListener", {
174 value: function(type, listener, useCapture, atSignIndex, bindingOrigin, bindingPropertyPath, bindingDescriptor) { 174 value: function(type, listener, useCapture, atSignIndex, bindingOrigin, bindingPropertyPath, bindingDescriptor) {
175 175
@@ -203,41 +203,41 @@ Object.defineProperty(Object.prototype, "propertyChangeBindingListener", {
203 Binding descriptor keys 203 Binding descriptor keys
204 @class module:montage/core/event/binding.BindingDescriptor 204 @class module:montage/core/event/binding.BindingDescriptor
205 @extends module:montage/core/core.Montage 205 @extends module:montage/core/core.Montage
206 */ 206*/
207var BindingDescriptor = exports.BindingDescriptor = Montage.create(Montage, /** @lends module:montage/core/event/binding.BindingDescriptor */ { 207var BindingDescriptor = exports.BindingDescriptor = Montage.create(Montage, /** @lends module:montage/core/event/binding.BindingDescriptor */ {
208 208
209 /** 209/**
210 The object sourceObject will be bound to 210 The object sourceObject will be bound to
211 */ 211*/
212 boundObject: { 212 boundObject: {
213 enumerable: false, 213 enumerable: false,
214 serializable: true, 214 serializable: true,
215 value: null 215 value: null
216 }, 216 },
217 217
218 /** 218/**
219 219
220 The key path of boundObject which sourceObject's sourceObjectBindingPath is bound to 220 The key path of boundObject which sourceObject's sourceObjectBindingPath is bound to
221 221
222 */ 222*/
223 boundObjectPropertyPath: { 223 boundObjectPropertyPath: {
224 enumerable: false, 224 enumerable: false,
225 serializable: true, 225 serializable: true,
226 value: null 226 value: null
227 }, 227 },
228 228
229 /** 229/**
230 Specifies whether the source Object will push value back to it's boundObject's boundObjectPropertyPath or not. Default is false. 230 Specifies whether the source Object will push value back to it's boundObject's boundObjectPropertyPath or not. Default is false.
231 */ 231*/
232 oneway: { 232 oneway: {
233 enumerable: false, 233 enumerable: false,
234 serializable: true, 234 serializable: true,
235 value: null 235 value: null
236 }, 236 },
237 237
238 /** 238/**
239 If true, PropertyChangeBindingListener will buffer the value until it's told to execute binding. Setting this value to false allows for some runtime optimizations.deferred. Default is false, binding values propagate immediately. 239 If true, PropertyChangeBindingListener will buffer the value until it's told to execute binding. Setting this value to false allows for some runtime optimizations.deferred. Default is false, binding values propagate immediately.
240 */ 240*/
241 deferred: { 241 deferred: {
242 enumerable: false, 242 enumerable: false,
243 serializable: true, 243 serializable: true,
@@ -298,12 +298,12 @@ Deserializer.defineDeserializationUnit("bindings", function(object, bindings, de
298}); 298});
299 299
300/** 300/**
301 @function external:Object.defineBinding 301 @function external:Object.defineBinding
302 @param {object} sourceObject The source object of the data binding. This object establishes the binding between itself and the "bound object" specified by the <code>bindingDescriptor</code> parameter. 302 @param {object} sourceObject The source object of the data binding. This object establishes the binding between itself and the "bound object" specified by the <code>bindingDescriptor</code> parameter.
303 @param {string} sourceObjectPropertyBindingPath The key path to the source object's property that is being bound. 303 @param {string} sourceObjectPropertyBindingPath The key path to the source object's property that is being bound.
304 @param {object} bindingDescriptor An object that describes the bound object, the bound object's property path, and other properties. 304 @param {object} bindingDescriptor An object that describes the bound object, the bound object's property path, and other properties.
305 @see [BindingDescriptor object]{@link module:montage/core/event/binding#BindingDescriptor} 305 @see [BindingDescriptor object]{@link module:montage/core/event/binding#BindingDescriptor}
306 */ 306*/
307Object.defineProperty(Object, "defineBinding", {value: function(sourceObject, sourceObjectPropertyBindingPath, bindingDescriptor) { 307Object.defineProperty(Object, "defineBinding", {value: function(sourceObject, sourceObjectPropertyBindingPath, bindingDescriptor) {
308 var _bindingDescriptors = sourceObject._bindingDescriptors, 308 var _bindingDescriptors = sourceObject._bindingDescriptors,
309 oneway = typeof bindingDescriptor.oneway === "undefined" ? false : bindingDescriptor.oneway, 309 oneway = typeof bindingDescriptor.oneway === "undefined" ? false : bindingDescriptor.oneway,
@@ -420,11 +420,11 @@ Object.defineProperty(Object.prototype, "_deserializeProperty_bindingDescriptors
420}); 420});
421 421
422/** 422/**
423 Deletes a single binding on the specified object. 423 Deletes a single binding on the specified object.
424 @function external:Object.deleteBinding 424 @function external:Object.deleteBinding
425 @param {object} sourceObject The source object that defined the binding. 425 @param {object} sourceObject The source object that defined the binding.
426 @param {string} sourceObjectPropertyBindingPath The key path to the bound object's bound property. 426 @param {string} sourceObjectPropertyBindingPath The key path to the bound object's bound property.
427 */ 427*/
428Object.defineProperty(Object, "deleteBinding", {value: function(sourceObject, sourceObjectPropertyBindingPath) { 428Object.defineProperty(Object, "deleteBinding", {value: function(sourceObject, sourceObjectPropertyBindingPath) {
429 var _bindingDescriptors = sourceObject._bindingDescriptors, 429 var _bindingDescriptors = sourceObject._bindingDescriptors,
430 bindingDescriptor, 430 bindingDescriptor,
@@ -448,10 +448,10 @@ Object.defineProperty(Object, "deleteBinding", {value: function(sourceObject, so
448}}); 448}});
449 449
450/** 450/**
451 Deletes all bindings on the specified object. 451 Deletes all bindings on the specified object.
452 @function external:Object.deleteBindings 452 @function external:Object.deleteBindings
453 @param {object} object The object to delete bindings from. 453 @param {object} object The object to delete bindings from.
454 */ 454*/
455Object.defineProperty(Object, "deleteBindings", {value: function(object) { 455Object.defineProperty(Object, "deleteBindings", {value: function(object) {
456 var bindingDescriptors = object._bindingDescriptors; 456 var bindingDescriptors = object._bindingDescriptors;
457 457
@@ -490,17 +490,17 @@ Object.defineProperty(Object, "applyBindingsDeferredValues", {value: function(ob
490Montage.defineProperty(Object.prototype, "_bindingsDisabled", {enumerable: false, value: null}); 490Montage.defineProperty(Object.prototype, "_bindingsDisabled", {enumerable: false, value: null});
491 491
492/** 492/**
493 Temporarily disables bindings on the specified object. To re-enable bindings, call [Object.enableBindings()]{@link external:Object.enableBindings}. 493 Temporarily disables bindings on the specified object. To re-enable bindings, call [Object.enableBindings()]{@link external:Object.enableBindings}.
494 @function external:Object.disableBindings 494 @function external:Object.disableBindings
495 */ 495*/
496Object.defineProperty(Object, "disableBindings", {value: function(object) { 496Object.defineProperty(Object, "disableBindings", {value: function(object) {
497 object._bindingsDisabled = true; 497 object._bindingsDisabled = true;
498}}); 498}});
499