diff options
author | Pushkar Joshi | 2012-02-24 12:08:49 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-02-24 12:08:49 -0800 |
commit | 03ca7a5ed13c25faaa9100bb666e062fd15335e6 (patch) | |
tree | c51112223ceb9121cd595a60335eb2795215590f /js/panels/Timeline/Keyframe.reel | |
parent | fcb12cc09eb3cd3b42bd215877ba18f449275b75 (diff) | |
parent | 053fc63a2950c7a5ee4ebf98033b64d474a3c46e (diff) | |
download | ninja-03ca7a5ed13c25faaa9100bb666e062fd15335e6.tar.gz |
Merge branch 'pentool' into brushtool
Conflicts:
imports/codemirror/mode/scheme/scheme.js
js/tools/BrushTool.js
Diffstat (limited to 'js/panels/Timeline/Keyframe.reel')
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/Keyframe.html | 30 | ||||
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/Keyframe.js | 61 | ||||
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/css/Keyframe.css | 21 |
3 files changed, 112 insertions, 0 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.html b/js/panels/Timeline/Keyframe.reel/Keyframe.html new file mode 100644 index 00000000..7e917b5a --- /dev/null +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.html | |||
@@ -0,0 +1,30 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | <html lang="en"> | ||
8 | <head> | ||
9 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
10 | <link rel="stylesheet" type="text/css" href="css/Keyframe.css"> | ||
11 | <script type="text/montage-serialization"> | ||
12 | { | ||
13 | "owner": { | ||
14 | "module": "js/panels/Timeline/Keyframe.reel", | ||
15 | "name": "Keyframe", | ||
16 | "properties": { | ||
17 | "element": {"#": "keyframespace"} | ||
18 | } | ||
19 | } | ||
20 | |||
21 | } | ||
22 | </script> | ||
23 | </head> | ||
24 | <body> | ||
25 | |||
26 | <div id="keyframespace" class="tween_keyframe"> | ||
27 | </div> | ||
28 | |||
29 | </body> | ||
30 | </html> \ No newline at end of file | ||
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js new file mode 100644 index 00000000..859cdfb1 --- /dev/null +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js | |||
@@ -0,0 +1,61 @@ | |||
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 | |||
7 | var Montage = require("montage/core/core").Montage; | ||
8 | var Component = require("montage/ui/component").Component; | ||
9 | |||
10 | var Keyframe = exports.Keyframe = Montage.create(Component, { | ||
11 | |||
12 | hasTemplate:{ | ||
13 | value: true | ||
14 | }, | ||
15 | |||
16 | _position:{ | ||
17 | value:0 | ||
18 | }, | ||
19 | |||
20 | position:{ | ||
21 | serializable:true, | ||
22 | get:function(){ | ||
23 | return this._position; | ||
24 | }, | ||
25 | set:function(value){ | ||
26 | this._position = value; | ||
27 | this.needsDraw = true; | ||
28 | } | ||
29 | }, | ||
30 | |||
31 | prepareForDraw:{ | ||
32 | value:function(){ | ||
33 | this.element.addEventListener("click", this, false); | ||
34 | } | ||
35 | }, | ||
36 | |||
37 | draw:{ | ||
38 | value:function(){ | ||
39 | this.element.style.left = (this.position - 3) + "px"; | ||
40 | } | ||
41 | }, | ||
42 | |||
43 | deselectKeyframe:{ | ||
44 | value:function(){ | ||
45 | this.element.classList.remove("keyframeSelected"); | ||
46 | } | ||
47 | }, | ||
48 | |||
49 | selectKeyframe:{ | ||
50 | value:function(){ | ||
51 | this.element.classList.add("keyframeSelected"); | ||
52 | this.parentComponent.selectTween(); | ||
53 | } | ||
54 | }, | ||
55 | |||
56 | handleClick:{ | ||
57 | value:function(ev){ | ||
58 | this.selectKeyframe(); | ||
59 | } | ||
60 | } | ||
61 | }); | ||
diff --git a/js/panels/Timeline/Keyframe.reel/css/Keyframe.css b/js/panels/Timeline/Keyframe.reel/css/Keyframe.css new file mode 100644 index 00000000..ff5dae7a --- /dev/null +++ b/js/panels/Timeline/Keyframe.reel/css/Keyframe.css | |||
@@ -0,0 +1,21 @@ | |||
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 | |||
7 | .tween_keyframe{ | ||
8 | position: absolute; | ||
9 | height: 16px; | ||
10 | width: 5px; | ||
11 | background-color: white; | ||
12 | z-index: 23; | ||
13 | border-radius: 3px; | ||
14 | } | ||
15 | |||
16 | .tween_keyframe.keyframeSelected{ | ||
17 | background-color: #570e19; | ||
18 | border-style: solid; | ||
19 | border-width: thin; | ||
20 | border-color: #d6d1cf; | ||
21 | } \ No newline at end of file | ||