diff options
author | Kruti Shah | 2012-07-17 12:40:00 -0700 |
---|---|---|
committer | Kruti Shah | 2012-07-17 12:40:00 -0700 |
commit | bf2d7bdb22c28089dc1067bc9094ebc590daac87 (patch) | |
tree | 2156d9920ea1b7db49ed6460545fea7cda121bae /js/panels/Timeline/Layer.reel/Layer.js | |
parent | 7e2c2dbd040ed79a3f0678f91bd4b6db9cf69231 (diff) | |
parent | b4b3e45d6684e77d361b4f8ca5be4889428320c5 (diff) | |
download | ninja-bf2d7bdb22c28089dc1067bc9094ebc590daac87.tar.gz |
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 1301 |
1 files changed, 651 insertions, 650 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index c10731a3..f303fd79 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -1,24 +1,25 @@ | |||
1 | /* <copyright> | 1 | /* <copyright> |
2 | Copyright (c) 2012, Motorola Mobility, Inc | 2 | Copyright (c) 2012, Motorola Mobility LLC. |
3 | All Rights Reserved. | 3 | All Rights Reserved. |
4 | BSD License. | ||
5 | 4 | ||
6 | Redistribution and use in source and binary forms, with or without | 5 | Redistribution and use in source and binary forms, with or without |
7 | modification, are permitted provided that the following conditions are met: | 6 | modification, are permitted provided that the following conditions are met: |
8 | 7 | ||
9 | - Redistributions of source code must retain the above copyright notice, | 8 | * Redistributions of source code must retain the above copyright notice, |
10 | this list of conditions and the following disclaimer. | 9 | this list of conditions and the following disclaimer. |
11 | - Redistributions in binary form must reproduce the above copyright | 10 | |
12 | notice, this list of conditions and the following disclaimer in the | 11 | * Redistributions in binary form must reproduce the above copyright notice, |
13 | documentation and/or other materials provided with the distribution. | 12 | this list of conditions and the following disclaimer in the documentation |
14 | - Neither the name of Motorola Mobility nor the names of its contributors | 13 | and/or other materials provided with the distribution. |
15 | may be used to endorse or promote products derived from this software | 14 | |
16 | without specific prior written permission. | 15 | * Neither the name of Motorola Mobility LLC nor the names of its |
16 | contributors may be used to endorse or promote products derived from this | ||
17 | software without specific prior written permission. | ||
17 | 18 | ||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
@@ -69,50 +70,50 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
69 | value: null, | 70 | value: null, |
70 | serializable: true | 71 | serializable: true |
71 | }, | 72 | }, |
72 | 73 | ||
73 | /* Begin: Models */ | 74 | /* Begin: Models */ |
74 | 75 | ||
75 | /* Main collapser model: the main collapser for the layer */ | 76 | /* Main collapser model: the main collapser for the layer */ |
76 | _mainCollapser : { | 77 | _mainCollapser : { |
77 | value: false | 78 | value: false |
78 | }, | 79 | }, |
79 | mainCollapser: { | 80 | mainCollapser: { |
80 | get: function() { | 81 | get: function() { |
81 | return this._mainCollapser; | 82 | return this._mainCollapser; |
82 | }, | 83 | }, |
83 | set: function(newVal) { | 84 | set: function(newVal) { |
84 | this._mainCollapser = newVal; | 85 | this._mainCollapser = newVal; |
85 | }, | 86 | }, |
86 | serializable: true | 87 | serializable: true |
87 | }, | 88 | }, |
88 | 89 | ||
89 | /* Style models: the array of styles, and the repetition that uses them */ | 90 | /* Style models: the array of styles, and the repetition that uses them */ |
90 | _arrLayerStyles : { | 91 | _arrLayerStyles : { |
91 | value: [] | 92 | value: [] |
92 | }, | 93 | }, |
93 | arrLayerStyles : { | 94 | arrLayerStyles : { |
94 | serializable: true, | 95 | serializable: true, |
95 | get: function() { | 96 | get: function() { |
96 | return this._arrLayerStyles; | 97 | return this._arrLayerStyles; |
97 | }, | 98 | }, |
98 | set: function(newVal) { | 99 | set: function(newVal) { |
99 | this._arrLayerStyles = newVal; | 100 | this._arrLayerStyles = newVal; |
100 | } | 101 | } |
101 | }, | 102 | }, |
102 | _styleRepetition : { | 103 | _styleRepetition : { |
103 | value: false | 104 | value: false |
104 | }, | 105 | }, |
105 | styleRepetition : { | 106 | styleRepetition : { |
106 | serializable: true, | 107 | serializable: true, |
107 | get: function() { | 108 | get: function() { |
108 | return this._styleRepetition; | 109 | return this._styleRepetition; |
109 | }, | 110 | }, |
110 | set: function(newVal) { | 111 | set: function(newVal) { |
111 | this._styleRepetition = newVal; | 112 | this._styleRepetition = newVal; |
112 | } | 113 | } |
113 | }, | 114 | }, |
114 | _styleCounter : { | 115 | _styleCounter : { |
115 | value: 0 | 116 | value: 0 |
116 | }, | 117 | }, |
117 | styleCounter:{ | 118 | styleCounter:{ |
118 | serializable:true, | 119 | serializable:true, |
@@ -124,21 +125,21 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
124 | } | 125 | } |
125 | }, | 126 | }, |
126 | _selectedStyleIndex: { | 127 | _selectedStyleIndex: { |
127 | value: false | 128 | value: false |
128 | }, | 129 | }, |
129 | selectedStyleIndex: { | 130 | selectedStyleIndex: { |
130 | get: function() { | 131 | get: function() { |
131 | return this._selectedStyleIndex; | 132 | return this._selectedStyleIndex; |
132 | }, | 133 | }, |
133 | set: function(newVal) { | 134 | set: function(newVal) { |
134 | if (typeof(newVal) === "undefined") { | 135 | if (typeof(newVal) === "undefined") { |
135 | return; | 136 | return; |
136 | } | 137 | } |
137 | if (newVal !== this._selectedStyleIndex) { | 138 | if (newVal !== this._selectedStyleIndex) { |
138 | this._selectedStyleIndex = newVal; | 139 | this._selectedStyleIndex = newVal; |
139 | this.layerData.selectedStyleIndex = newVal; | 140 | this.layerData.selectedStyleIndex = newVal; |
140 | } | 141 | } |
141 | } | 142 | } |
142 | }, | 143 | }, |
143 | _storedStyleIndex : { | 144 | _storedStyleIndex : { |
144 | value: false | 145 | value: false |
@@ -146,39 +147,39 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
146 | 147 | ||
147 | /* Layer models: the name, ID, and selected and animation booleans for the layer */ | 148 | /* Layer models: the name, ID, and selected and animation booleans for the layer */ |
148 | _layerName:{ | 149 | _layerName:{ |
149 | value: "" | 150 | value: "" |
150 | }, | 151 | }, |
151 | 152 | ||
152 | layerName:{ | 153 | layerName:{ |
153 | serializable: true, | 154 | serializable: true, |
154 | get:function(){ | 155 | get:function(){ |
155 | return this._layerName; | 156 | return this._layerName; |
156 | }, | 157 | }, |
157 | set:function(newVal){ | 158 | set:function(newVal){ |
158 | if (this._layerEditable.value !== newVal) { | 159 | if (this._layerEditable.value !== newVal) { |
159 | this._layerEditable.value = newVal; | 160 | this._layerEditable.value = newVal; |
160 | } | 161 | } |
161 | if (this._layerName !== newVal) { | 162 | if (this._layerName !== newVal) { |
162 | this._layerName = newVal; | 163 | this._layerName = newVal; |
163 | } | 164 | } |
164 | if (this.layerData.layerName !== newVal) { | 165 | if (this.layerData.layerName !== newVal) { |
165 | this.layerData.layerName = newVal; | 166 | this.layerData.layerName = newVal; |
166 | } | 167 | } |
167 | 168 | ||
168 | if (typeof(this.dynamicLayerName) !== "undefined") { | 169 | if (typeof(this.dynamicLayerName) !== "undefined") { |
169 | if (this.dynamicLayerName.value !== newVal) { | 170 | if (this.dynamicLayerName.value !== newVal) { |
170 | this.dynamicLayerName.value = newVal; | 171 | this.dynamicLayerName.value = newVal; |
171 | } | 172 | } |
172 | } | 173 | } |
173 | this.needsDraw = true; | 174 | this.needsDraw = true; |
174 | } | 175 | } |
175 | }, | 176 | }, |
176 | _layerID:{ | 177 | _layerID:{ |
177 | value: "Default Layer ID" | 178 | value: "Default Layer ID" |
178 | }, | 179 | }, |
179 | 180 | ||
180 | layerID:{ | 181 | layerID:{ |
181 | serializable: true, | 182 | serializable: true, |
182 | get:function(){ | 183 | get:function(){ |
183 | return this._layerID; | 184 | return this._layerID; |
184 | }, | 185 | }, |
@@ -188,132 +189,132 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
188 | } | 189 | } |
189 | }, | 190 | }, |
190 | _layerTag:{ | 191 | _layerTag:{ |
191 | value: "tag" | 192 | value: "tag" |
192 | }, | 193 | }, |
193 | 194 |