aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Span.reel/Span.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Span.reel/Span.js')
-rw-r--r--js/panels/Timeline/Span.reel/Span.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/js/panels/Timeline/Span.reel/Span.js b/js/panels/Timeline/Span.reel/Span.js
new file mode 100644
index 00000000..bfa6aab8
--- /dev/null
+++ b/js/panels/Timeline/Span.reel/Span.js
@@ -0,0 +1,42 @@
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
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9
10var Span = exports.Span = Montage.create(Component, {
11
12 hasTemplate:{
13 value: true
14 },
15
16 _spanWidth:{
17 value:0
18 },
19
20 spanWidth:{
21 serializable:true,
22 get:function () {
23 return this._spanWidth;
24 },
25 set:function (value) {
26 this._spanWidth = value;
27 this.needsDraw = true;
28 }
29 },
30
31 draw:{
32 value: function(){
33 this.element.style.width = this.spanWidth + "px";
34 }
35 },
36
37 highlightSpan:{
38 value: function(){
39 this.element.classList.add("spanHighlight");
40 }
41 }
42});