diff options
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 2758 |
1 files changed, 1409 insertions, 1349 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index f53d54aa..291e3416 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -1,1350 +1,1410 @@ | |||
1 | /* <copyright> | 1 | /* <copyright> |
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | 2 | Copyright (c) 2012, Motorola Mobility, Inc |
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | 3 | All Rights Reserved. |
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | BSD License. |
5 | </copyright> */ | 5 | |
6 | 6 | Redistribution and use in source and binary forms, with or without | |
7 | var Montage = require("montage/core/core").Montage; | 7 | modification, are permitted provided that the following conditions are met: |
8 | var Component = require("montage/ui/component").Component; | 8 | |
9 | var Hintable = require("js/components/hintable.reel").Hintable; | 9 | - Redistributions of source code must retain the above copyright notice, |
10 | var nj = require("js/lib/NJUtils").NJUtils; | 10 | this list of conditions and the following disclaimer. |
11 | var ElementsMediator = require("js/mediators/element-mediator").ElementMediator; | 11 | - Redistributions in binary form must reproduce the above copyright |
12 | 12 | notice, this list of conditions and the following disclaimer in the | |
13 | var Layer = exports.Layer = Montage.create(Component, { | 13 | documentation and/or other materials provided with the distribution. |
14 | 14 | - Neither the name of Motorola Mobility nor the names of its contributors | |
15 | /* Begin: Models */ | 15 | may be used to endorse or promote products derived from this software |
16 | _timelinePanel: { | 16 | without specific prior written permission. |
17 | value: null | 17 | |
18 | }, | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
19 | 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
20 | _dynamicLayerTag: { | 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 | value: null | 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
22 | }, | 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | dynamicLayerTag: { | 23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | serializable: true, | 24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
25 | get: function() { | 25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
26 | return this._dynamicLayerTag; | 26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
27 | }, | 27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 | set: function(newVal) { | 28 | POSSIBILITY OF SUCH DAMAGE. |
29 | this._dynamicLayerTag = newVal; | 29 | </copyright> */ |
30 | } | 30 | |
31 | }, | 31 | var Montage = require("montage/core/core").Montage; |
32 | 32 | var Component = require("montage/ui/component").Component; | |
33 | _positionCollapser: { | 33 | var Collapser = require("js/panels/Timeline/Collapser").Collapser; |
34 | value: null | 34 | var Hintable = require("js/components/hintable.reel").Hintable; |
35 | }, | 35 | var LayerStyle = require("js/panels/Timeline/Style.reel").LayerStyle; |
36 | positionCollapser: { | 36 | var DynamicText = require("montage/ui/dynamic-text.reel").DynamicText; |
37 | serializable: true, | 37 | var defaultEventManager = require("montage/core/event/event-manager").defaultEventManager; |
38 | get: function() { | 38 | var nj = require("js/lib/NJUtils").NJUtils; |
39 | return this._positionCollapser; | 39 | var ElementsMediator = require("js/mediators/element-mediator").ElementMediator; |
40 | }, | 40 | |
41 | set: function(newVal) { | 41 | var Layer = exports.Layer = Montage.create(Component, { |
42 | this._positionCollapser = newVal; | 42 | |
43 | } | 43 | dynamicLayerTag: { |
44 | }, | 44 | value: null, |
45 | 45 | serializable: true | |
46 | _transformCollapser: { | 46 | }, |
47 | value: null | 47 | |
48 | }, | 48 | positionCollapser: { |
49 | transformCollapser: { | 49 | value: null, |
50 | serializable: true, | 50 | serializable: true |
51 | get: function() { | 51 | }, |
52 | return this._transformCollapser; | 52 | |
53 | }, | 53 | transformCollapser: { |
54 | set: function(newVal) { | 54 | value: null, |
55 | this._transformCollapser = newVal; | 55 | serializable: true |
56 | } | 56 | }, |
57 | }, | 57 | |
58 | 58 | styleCollapser: { | |
59 | _styleCollapser: { | 59 | value: null, |
60 | value: null | 60 | serializable: true |
61 | }, | 61 | }, |
62 | styleCollapser: { | 62 | |
63 | serializable: true, | 63 | clickerMain: { |
64 | get: function() { | 64 | value: null, |
65 | return this._styleCollapser; | 65 | serializable: true |
66 | }, | 66 | }, |
67 | set: function(newVal) { | 67 | |
68 | this._styleCollapser = newVal; | 68 | myLabel: { |
69 | } | 69 | value: null, |
70 | }, | 70 | serializable: true |
71 | 71 | }, | |
72 | _clickerMain: { | 72 | |
73 | value: null | 73 | /* Begin: Models */ |
74 | }, | 74 | |
75 | clickerMain: { | 75 | /* Main collapser model: the main collapser for the layer */ |
76 | serializable: true, | 76 | _mainCollapser : { |
77 | get: function() { | 77 | value: false |
78 | return this._clickerMain; | 78 | }, |
79 | }, | 79 | mainCollapser: { |
80 | set: function(newVal) { | 80 | get: function() { |
81 | this._clickerMain = newVal; | 81 | return this._mainCollapser; |
82 | } | 82 | }, |
83 | }, | 83 | set: function(newVal) { |
84 | 84 | this._mainCollapser = newVal; | |
85 | _myLabel: { | 85 | }, |
86 | value: null | 86 | serializable: true |
87 | }, | 87 | }, |
88 | myLabel: { | 88 | |
89 | serializable: true, | 89 | /* Style models: the array of styles, and the repetition that uses them */ |
90 | get: function() { | 90 | _arrLayerStyles : { |
91 | return this._myLabel; | 91 | value: [] |
92 | }, | 92 | }, |
93 | set: function(newVal) { | 93 | arrLayerStyles : { |
94 | this._myLabel = newVal; | 94 | serializable: true, |
95 | } | 95 | get: function() { |
96 | }, | 96 | return this._arrLayerStyles; |
97 | 97 | }, | |
98 | _mainCollapser : { | 98 | set: function(newVal) { |
99 | value: false | 99 | this._arrLayerStyles = newVal; |
100 | }, | 100 | } |
101 | mainCollapser: { | 101 | }, |
102 | get: function() { | 102 | _styleRepetition : { |
103 | return this._mainCollapser; | 103 | value: false |
104 | }, | 104 | }, |
105 | set: function(newVal) { | 105 | styleRepetition : { |
106 | this._mainCollapser = newVal; | 106 | serializable: true, |
107 | }, | 107 | get: function() { |
108 | serializable: true | 108 | return this._styleRepetition; |
109 | }, | 109 | }, |
110 | 110 | set: function(newVal) { | |
111 | _arrLayerStyles : { | 111 | this._styleRepetition = newVal; |
112 | value: [] | 112 | } |
113 | }, | 113 | }, |
114 | arrLayerStyles : { | 114 | _styleCounter : { |
115 | serializable: true, | 115 | value: 0 |
116 | get: function() { | 116 | }, |
117 | return this._arrLayerStyles; | 117 | styleCounter:{ |
118 | }, | 118 | serializable:true, |
119 | set: function(newVal) { | 119 | get:function () { |
120 | this._arrLayerStyles = newVal; | 120 | return this._styleCounter; |
121 | } | 121 | }, |
122 | }, | 122 | set:function (newVal) { |
123 | 123 | this._styleCounter = newVal; | |
124 | _styleRepetition : { | 124 | } |
125 | value: false | 125 | }, |
126 | }, | 126 | _selectedStyleIndex: { |
127 | styleRepetition : { | 127 | value: false |
128 | serializable: true, | 128 | }, |
129 | get: function() { | 129 | selectedStyleIndex: { |
130 | return this._styleRepetition; | 130 | get: function() { |
131 | }, | 131 | return this._selectedStyleIndex; |
132 | set: function(newVal) { | 132 | }, |
133 | this._styleRepetition = newVal; | 133 | set: function(newVal) { |
134 | } | 134 | if (typeof(newVal) === "undefined") { |
135 | }, | 135 | return; |
136 | 136 | } | |
137 | _styleCounter : { | 137 | if (newVal !== this._selectedStyleIndex) { |
138 | value: 0 | 138 | this._selectedStyleIndex = newVal; |
139 | }, | 139 | this.layerData.selectedStyleIndex = newVal; |
140 | styleCounter:{ | 140 | } |
141 | serializable:true, | 141 | } |
142 | get:function () { | 142 | }, |
143 | return this._styleCounter; | 143 | _storedStyleIndex : { |
144 | }, | 144 | value: false |
145 | set:function (newVal) { | 145 | }, |
146 | this._styleCounter = newVal; | 146 | |
147 | } | 147 | /* Layer models: the name, ID, and selected and animation booleans for the layer */ |
148 | }, | 148 | _layerName:{ |
149 |