aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Style.reel/Style.js
diff options
context:
space:
mode:
authorJohn Mayhew2012-07-09 17:28:24 -0700
committerJohn Mayhew2012-07-09 17:28:24 -0700
commit770bcb52422742ff741a88a75ecefbeb90bc9247 (patch)
tree64cb3e09a8daeb340261dd7f3869c73f7b90b643 /js/panels/Timeline/Style.reel/Style.js
parent8c5ecaf90062f9e030386f338bdc19fd62b826c8 (diff)
parent2b2b5fbb4b6a786daa4e9d4ee9eba9ac78924842 (diff)
downloadninja-770bcb52422742ff741a88a75ecefbeb90bc9247.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Conflicts: manifest.json
Diffstat (limited to 'js/panels/Timeline/Style.reel/Style.js')
-rw-r--r--js/panels/Timeline/Style.reel/Style.js595
1 files changed, 298 insertions, 297 deletions
diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js
index 122c2c0a..bfa6f930 100644
--- a/js/panels/Timeline/Style.reel/Style.js
+++ b/js/panels/Timeline/Style.reel/Style.js
@@ -1,24 +1,25 @@
1/* <copyright> 1/* <copyright>
2Copyright (c) 2012, Motorola Mobility, Inc 2Copyright (c) 2012, Motorola Mobility LLC.
3All Rights Reserved. 3All Rights Reserved.
4BSD License.
5 4
6Redistribution and use in source and binary forms, with or without 5Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met: 6modification, 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
18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@@ -31,17 +32,17 @@ POSSIBILITY OF SUCH DAMAGE.
31/* 32/*
32 * Style component: Edits and manages a single style rule for a Layer in the Timeline. 33 * Style component: Edits and manages a single style rule for a Layer in the Timeline.
33 * Public Properties: 34 * Public Properties:
34 * editorProperty: The CSS property for the style. 35 * editorProperty: The CSS property for the style.
35 * editorValue: The value for the editorProperty. 36 * editorValue: The value for the editorProperty.
36 * whichView: Which view to show, the hintable view (where a new property can be typed in) 37 * whichView: Which view to show, the hintable view (where a new property can be typed in)
37 * or the propval view (where the property's value can be set with the tweener). 38 * or the propval view (where the property's value can be set with the tweener).
38 * Valid values are "hintable" and "propval", defaults to "hintable". 39 * Valid values are "hintable" and "propval", defaults to "hintable".
39 * 40 *
40 */ 41 */
41 42
42var Montage = require("montage/core/core").Montage; 43var Montage = require("montage/core/core").Montage;
43var Component = require("montage/ui/component").Component; 44var Component = require("montage/ui/component").Component;
44var ElementsMediator = require("js/mediators/element-mediator").ElementMediator 45var ElementsMediator = require("js/mediators/element-mediator").ElementMediator
45 46
46 47
47var LayerStyle = exports.LayerStyle = Montage.create(Component, { 48var LayerStyle = exports.LayerStyle = Montage.create(Component, {
@@ -72,151 +73,151 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
72 }, 73 },
73 74
74 /* === BEGIN: Models === */ 75 /* === BEGIN: Models === */
75 // isSelected: whether or not the style is selected 76 // isSelected: whether or not the style is selected
76 _isSelected: { 77 _isSelected: {
77 value: false 78 value: false
78 }, 79 },
79 isSelected: { 80 isSelected: {
80 serializable: true, 81 serializable: true,
81 get: function() { 82 get: function() {
82 return this._isSelected; 83 return this._isSelected;
83 }, 84 },
84 set: function(newVal) { 85 set: function(newVal) {
85 86
86 if (newVal !== this._isSelected) { 87 if (newVal !== this._isSelected) {
87 this._isSelected = newVal; 88 this._isSelected = newVal;
88 this.needsDraw = true; 89 this.needsDraw = true;
89 } 90 }
90 } 91 }
91 }, 92 },
92 93
93 /* isActive: Whether or not the user is actively clicking within the style; used to communicate state with 94 /* isActive: Whether or not the user is actively clicking within the style; used to communicate state with
94 * parent Layer. 95 * parent Layer.
95 */ 96 */
96 _isActive: { 97 _isActive: {
97 value: false 98 value: false
98 }, 99 },
99 isActive: { 100 isActive: {
100 get: function() { 101 get: function() {
101 return this._isActive; 102 return this._isActive;
102 }, 103 },
103 set: function(newVal) { 104 set: function(newVal) {
104 this._isActive = newVal; 105 this._isActive = newVal;
105 } 106 }
106 }, 107 },
107 108
108 // Property for this editor 109 // Property for this editor
109 _editorProperty: { 110 _editorProperty: {
110 value: "" 111 value: ""
111 }, 112 },
112 editorProperty: { 113 editorProperty: {
113 serializable: true, 114 serializable: true,
114 get: function() { 115 get: function() {
115 return this._editorProperty; 116 return this._editorProperty;
116 }, 117 },
117 set: function(newVal) { 118 set: function(newVal) {
118 this._editorProperty = newVal; 119 this._editorProperty = newVal;
119 this.needsDraw = true; 120 this.needsDraw = true;
120 } 121 }
121 }, 122 },
122 123
123 // Value for the property for this editor. 124 // Value for the property for this editor.
124 _editorValue: { 125 _editorValue: {
125 value: "" 126 value: ""
126 }, 127 },
127 editorValue: { 128 editorValue: {
128 serializable: true, 129 serializable: true,
129 get: function() { 130 get: function() {
130 return this._editorValue; 131 return this._editorValue;
131 }, 132 },
132 set: function(newVal) { 133 set: function(newVal) {
133 this._editorValue = newVal; 134 this._editorValue = newVal;
134 this.needsDraw = true; 135 this.needsDraw = true;
135 } 136 }
136 }, 137 },
137 138
138 // The tweener used to change the value for this property. 139 // The tweener used to change the value for this property.
139 _ruleTweener: { 140 _ruleTweener: {
140 value: false 141 value: false
141 }, 142 },
142 ruleTweener: { 143 ruleTweener: {
143 serializable: true, 144 serializable: true,
144 get: function() { 145 get: function() {
145 return this._ruleTweener; 146 return this._ruleTweener;
146 }, 147 },
147 set: function(newVal) { 148 set: function(newVal) {
148 this._ruleTweener = newVal; 149 this._ruleTweener = newVal;
149 this.needsDraw = true; 150 this.needsDraw = true;
150 } 151 }
151 }, 152 },
152 153
153 // The hintable we use to change the Property 154 // The hintable we use to change the Property
154 _myHintable: { 155 _myHintable: {
155 value: "" 156 value: ""
156 }, 157 },
157 myHintable: { 158 myHintable: {
158 get: function() { 159 get: function() {
159 return this._myHintable; 160 return this._myHintable;
160 }, 161 },
161 set: function(newVal) { 162 set: function(newVal) {
162 this._myHintable = newVal; 163 this._myHintable = newVal;
163 }, 164 },
164 serializable: true 165 serializable: true
165 }, 166 },
166 _myHintableValue : { 167 _myHintableValue : {
167 value: null 168 value: null
168 }, 169 },
169 myHintableValue: {