diff options
author | Kris Kowal | 2012-07-09 16:38:08 -0700 |
---|---|---|
committer | Kris Kowal | 2012-07-09 16:38:08 -0700 |
commit | 7bee50379c1df86bb571e0e8d6c08e24d25231f5 (patch) | |
tree | 5b11abd0414e0a3ab50ec6276b6334fbd168db7e /js/panels/Timeline/Span.reel | |
parent | 26d4b5ce30e6e0ea6e0fde870853c1e2a673a7b4 (diff) | |
download | ninja-7bee50379c1df86bb571e0e8d6c08e24d25231f5.tar.gz |
BSD License
Diffstat (limited to 'js/panels/Timeline/Span.reel')
-rw-r--r-- | js/panels/Timeline/Span.reel/Span.html | 23 | ||||
-rw-r--r-- | js/panels/Timeline/Span.reel/Span.js | 59 | ||||
-rw-r--r-- | js/panels/Timeline/Span.reel/css/Span.css | 23 | ||||
-rw-r--r-- | js/panels/Timeline/Span.reel/scss/Span.scss | 23 |
4 files changed, 66 insertions, 62 deletions
diff --git a/js/panels/Timeline/Span.reel/Span.html b/js/panels/Timeline/Span.reel/Span.html index d328fcdb..e1cb43fc 100644 --- a/js/panels/Timeline/Span.reel/Span.html +++ b/js/panels/Timeline/Span.reel/Span.html | |||
@@ -1,25 +1,26 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <!-- <copyright> | 2 | <!-- <copyright> |
3 | Copyright (c) 2012, Motorola Mobility, Inc | 3 | Copyright (c) 2012, Motorola Mobility LLC. |
4 | All Rights Reserved. | 4 | All Rights Reserved. |
5 | BSD License. | ||
6 | 5 | ||
7 | Redistribution and use in source and binary forms, with or without | 6 | Redistribution and use in source and binary forms, with or without |
8 | modification, are permitted provided that the following conditions are met: | 7 | modification, are permitted provided that the following conditions are met: |
9 | 8 | ||
10 | - Redistributions of source code must retain the above copyright notice, | 9 | * Redistributions of source code must retain the above copyright notice, |
11 | this list of conditions and the following disclaimer. | 10 | this list of conditions and the following disclaimer. |
12 | - Redistributions in binary form must reproduce the above copyright | 11 | |
13 | notice, this list of conditions and the following disclaimer in the | 12 | * Redistributions in binary form must reproduce the above copyright notice, |
14 | documentation and/or other materials provided with the distribution. | 13 | this list of conditions and the following disclaimer in the documentation |
15 | - Neither the name of Motorola Mobility nor the names of its contributors | 14 | and/or other materials provided with the distribution. |
16 | may be used to endorse or promote products derived from this software | 15 | |
17 | without specific prior written permission. | 16 | * Neither the name of Motorola Mobility LLC nor the names of its |
17 | contributors may be used to endorse or promote products derived from this | ||
18 | software without specific prior written permission. | ||
18 | 19 | ||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
diff --git a/js/panels/Timeline/Span.reel/Span.js b/js/panels/Timeline/Span.reel/Span.js index 0d013fe5..8f2c8e21 100644 --- a/js/panels/Timeline/Span.reel/Span.js +++ b/js/panels/Timeline/Span.reel/Span.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 |
@@ -51,7 +52,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
51 | this.needsDraw = true; | 52 | this.needsDraw = true; |
52 | } | 53 | } |
53 | }, | 54 | }, |
54 | 55 | ||
55 | _isHighlighted: { | 56 | _isHighlighted: { |
56 | value: false | 57 | value: false |
57 | }, | 58 | }, |
@@ -66,7 +67,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
66 | } | 67 | } |
67 | } | 68 | } |
68 | }, | 69 | }, |
69 | 70 | ||
70 | _areChoicesVisible: { | 71 | _areChoicesVisible: { |
71 | value: false | 72 | value: false |
72 | }, | 73 | }, |
@@ -81,7 +82,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
81 | } | 82 | } |
82 | } | 83 | } |
83 | }, | 84 | }, |
84 | 85 | ||
85 | _easing: { | 86 | _easing: { |
86 | value: "none" | 87 | value: "none" |
87 | }, | 88 | }, |
@@ -102,14 +103,14 @@ var Span = exports.Span = Montage.create(Component, { | |||
102 | } | 103 | } |
103 | } | 104 | } |
104 | }, | 105 | }, |
105 | 106 | ||
106 | // BEGIN: draw cycle | 107 | // BEGIN: draw cycle |
107 | prepareForDraw: { | 108 | prepareForDraw: { |
108 | value: function() { | 109 | value: function() { |
109 | this.init(); | 110 | this.init(); |
110 | } | 111 | } |
111 | }, | 112 | }, |
112 | 113 | ||
113 | draw:{ | 114 | draw:{ |
114 | value: function(){ | 115 | value: function(){ |
115 | this.element.style.width = this.spanWidth + "px"; | 116 | this.element.style.width = this.spanWidth + "px"; |
@@ -132,14 +133,14 @@ var Span = exports.Span = Montage.create(Component, { | |||
132 | this.container_easing.setAttribute("style", ""); | 133 | this.container_easing.setAttribute("style", ""); |
133 | this.easing_choice.setAttribute("style", ""); | 134 | this.easing_choice.setAttribute("style", ""); |
134 | } | 135 | } |
135 | 136 | ||
136 | // Highlight the span? | 137 | // Highlight the span? |
137 | if (this.isHighlighted === true) { | 138 | if (this.isHighlighted === true) { |
138 | this.element.classList.add("spanHighlight"); | 139 | this.element.classList.add("spanHighlight"); |
139 | } else { | 140 | } else { |
140 | this.element.classList.remove("spanHighlight"); | 141 | this.element.classList.remove("spanHighlight"); |
141 | } | 142 | } |
142 | 143 | ||
143 | /* | 144 | /* |
144 | // Hide or show the choices menu? | 145 | // Hide or show the choices menu? |
145 | if (this.areChoicesVisible === true) { | 146 | if (this.areChoicesVisible === true) { |
@@ -148,12 +149,12 @@ var Span = exports.Span = Montage.create(Component, { | |||
148 | this.easing_choices.style.display = "none"; | 149 | this.easing_choices.style.display = "none"; |
149 | } | 150 | } |
150 | */ | 151 | */ |
151 | 152 | ||
152 | // Change easing? | 153 | // Change easing? |
153 | if (this.easing_choice.innerText !== this.easing) { | 154 | if (this.easing_choice.innerText !== this.easing) { |
154 | this.easing_choice.innerText = this.easing; | 155 | this.easing_choice.innerText = this.easing; |
155 | } | 156 | } |
156 | 157 | ||
157 | } | 158 | } |
158 | }, | 159 | }, |
159 | 160 | ||
@@ -165,7 +166,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
165 | 166 | ||
166 | } | 167 | } |
167 | }, | 168 | }, |
168 | 169 | ||
169 | highlightSpan:{ | 170 | highlightSpan:{ |
170 | value: function(){ | 171 | value: function(){ |
171 | // Class add/remove should only be done in draw cycle. | 172 | // Class add/remove should only be done in draw cycle. |
@@ -173,7 +174,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
173 | this.isHighlighted = true; | 174 | this.isHighlighted = true; |
174 | } | 175 | } |
175 | }, | 176 | }, |
176 | 177 | ||
177 | handleEasingChoiceClick: { | 178 | handleEasingChoiceClick: { |
178 | value: function(event) { | 179 | value: function(event) { |
179 | event.stopPropagation(); | 180 | event.stopPropagation(); |
@@ -191,7 +192,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
191 | do { | 192 | do { |
192 | objReturn.left += obj.offsetLeft; | 193 | objReturn.left += obj.offsetLeft; |
193 | objReturn.top += obj.offsetTop; | 194 | objReturn.top += obj.offsetTop; |
194 | 195 | ||
195 | } while (obj = obj.offsetParent); | 196 | } while (obj = obj.offsetParent); |
196 | } | 197 | } |
197 | return objReturn; | 198 | return objReturn; |
@@ -209,21 +210,21 @@ var Span = exports.Span = Montage.create(Component, { | |||
209 | 210 | ||
210 | // Remove the pointer to ourselves | 211 | // Remove the pointer to ourselves |
211 | //this.application.ninja.timeline.currentOpenSpanMenu = false; | 212 | //this.application.ninja.timeline.currentOpenSpanMenu = false; |
212 |