aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/substitution.reel
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /node_modules/montage/ui/substitution.reel
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/substitution.reel')
-rwxr-xr-xnode_modules/montage/ui/substitution.reel/substitution.js91
1 files changed, 91 insertions, 0 deletions
diff --git a/node_modules/montage/ui/substitution.reel/substitution.js b/node_modules/montage/ui/substitution.reel/substitution.js
new file mode 100755
index 00000000..ad4034c1
--- /dev/null
+++ b/node_modules/montage/ui/substitution.reel/substitution.js
@@ -0,0 +1,91 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6/**
7 @module "montage/ui/substitution.reel"
8 @requires montage/core/core
9 @requires montage/ui/component
10 @requires montage/ui/slot
11 @requires core/logger
12*/
13var Montage = require("montage").Montage,
14 Component = require("ui/component").Component,
15 Slot = require("ui/slot.reel").Slot,
16 logger = require("core/logger").logger("substitution");
17/**
18 @class module:"montage/ui/substitution.reel".Substitution
19 */
20exports.Substitution = Montage.create(Slot, /** @lends module:"montage/ui/substitution.reel".Substitution# */ {
21
22 hasTemplate: {
23 enumerable: false,
24 value: false
25 },
26/**
27 Description TODO
28 @type {Property}
29 @default {}
30 */
31 switchComponents: {
32 enumerable: false,
33 serializable: true,
34 distinct: true,
35 value: {}
36 },
37/**
38 Description TODO
39 @private
40*/
41 _switchValue: {
42 enumerable: false,
43 value: null
44 },
45/**
46 Description TODO
47 @type {Function}
48 @default null
49 */
50 switchValue: {
51 enumerable: false,
52 get: function() {
53 return this._switchValue;
54 },
55 set: function(value) {
56
57 if (this._switchValue === value || this._isSwitchingContent) {
58 return;
59 }
60
61 this._switchValue = value;
62
63 if (this.switchComponents) {
64 this.content = this.switchComponents[this.switchValue];
65 }
66 }
67 },
68/**
69 Description TODO
70 @type {Property}
71 @default null
72 */
73 transition: {
74 enumerable: false,
75 value: null
76 },
77/**
78 Description TODO
79 @function
80 */
81 prepareForDraw: {
82 enumerable: false,
83 value: function() {
84
85 if (this.switchComponents) {
86 this.content = this.switchComponents[this.switchValue];
87 }
88 }
89 }
90
91});