aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorJonathan Duran2012-07-20 08:30:24 -0700
committerJonathan Duran2012-07-20 08:30:24 -0700
commit936fbd6d76d35e3f9574983682c266de6dce55f7 (patch)
treeedfbd366df9d7e7514425561a817fc2c67f398d9 /js/panels
parent7b7f4157dfd1d3ad2b4a266c92594da56a619254 (diff)
parent9053e2037821a5c8405fabb74db9635deacfe8d5 (diff)
downloadninja-936fbd6d76d35e3f9574983682c266de6dce55f7.tar.gz
Merge branch 'refs/heads/NINJA-master' into TimelineUber
Conflicts: js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Materials/materials-data.json18
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.js14
-rwxr-xr-xjs/panels/Splitter.js2
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html25
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js31
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css81
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss26
-rw-r--r--js/panels/css-panel/styles-view-delegate.js3
8 files changed, 127 insertions, 73 deletions
diff --git a/js/panels/Materials/materials-data.json b/js/panels/Materials/materials-data.json
index abdacbe1..6fe5da69 100644
--- a/js/panels/Materials/materials-data.json
+++ b/js/panels/Materials/materials-data.json
@@ -5,10 +5,18 @@
5 "label": "Ninja Materials", 5 "label": "Ninja Materials",
6 "children": [ 6 "children": [
7 { 7 {
8 "label": "Blue Sky",
9 "id" : "Blue Sky"
10 },
11 {
8 "label": "Bump Metal", 12 "label": "Bump Metal",
9 "id" : "Bump Metal" 13 "id" : "Bump Metal"
10 }, 14 },
11 { 15 {
16 "label": "Dark Blur",
17 "id" : "Dark Blur"
18 },
19 {
12 "label": "Flag", 20 "label": "Flag",
13 "id" : "Flag" 21 "id" : "Flag"
14 }, 22 },
@@ -17,10 +25,6 @@
17 "id" : "Linear Gradient" 25 "id" : "Linear Gradient"
18 }, 26 },
19 { 27 {
20 "label": "Paris",
21 "id" : "Paris"
22 },
23 {
24 "label": "Plasma", 28 "label": "Plasma",
25 "id" : "Plasma" 29 "id" : "Plasma"
26 }, 30 },
@@ -29,6 +33,10 @@
29 "id" : "Pulse" 33 "id" : "Pulse"
30 }, 34 },
31 { 35 {
36 "label": "Radial Blur",
37 "id" : "Radial Blur"
38 },
39 {
32 "label": "Radial Gradient", 40 "label": "Radial Gradient",
33 "id" : "Radial Gradient" 41 "id" : "Radial Gradient"
34 }, 42 },
diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
index aef48230..4b9044ae 100755
--- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
+++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
@@ -116,6 +116,14 @@ exports.MaterialsLibraryPanel = Montage.create(Component, {
116 handleShowMaterialPopup: { 116 handleShowMaterialPopup: {
117 enumerable: false, 117 enumerable: false,
118 value: function (event) { 118 value: function (event) {
119 var piButton = this.application.eventManager.componentClaimingPointer("mouse");
120 if(piButton) {
121 this.selectedMaterialNode = piButton.element;
122 } else {
123 this.selectedMaterialNode = null;
124 }
125
126 this.materialId = event.detail.materialId;
119 this._showMaterialPopup(event.detail); 127 this._showMaterialPopup(event.detail);
120 } 128 }
121 }, 129 },
@@ -213,7 +221,11 @@ exports.MaterialsLibraryPanel = Montage.create(Component, {
213 contentHt = parseFloat(content.style.height) || content.offsetHeight || 0, 221 contentHt = parseFloat(content.style.height) || content.offsetHeight || 0,
214 contentWd = parseFloat(content.style.width) || content.offsetWidth || 0, 222 contentWd = parseFloat(content.style.width) || content.offsetWidth || 0,
215 pt = webkitConvertPointFromNodeToPage(this.selectedMaterialNode, new WebKitPoint(0, 0)); 223 pt = webkitConvertPointFromNodeToPage(this.selectedMaterialNode, new WebKitPoint(0, 0));
216 return {top: pt.y - contentHt + 10, left: pt.x - contentWd + 10}; 224 if(!pt) {
225 return defaultPosition;
226 } else {
227 return {top: pt.y - contentHt + 10, left: pt.x - contentWd + 10};
228 }
217 } 229 }
218 } 230 }
219}); 231});
diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js
index 39e51901..0e7a4e68 100755
--- a/js/panels/Splitter.js
+++ b/js/panels/Splitter.js
@@ -111,6 +111,8 @@ exports.Splitter = Montage.create(Component, {
111 else this.panel.classList.remove("collapsed"); 111 else this.panel.classList.remove("collapsed");
112 this.element.classList.remove("collapsed"); 112 this.element.classList.remove("collapsed");
113 if(this._resizeBar != null) this.resizeBar.classList.remove("collapsed"); 113 if(this._resizeBar != null) this.resizeBar.classList.remove("collapsed");
114 // webkitTransitionEnd is not fired when expanded, so force draw here.
115 this.application.ninja.stage.resizeCanvases = true;
114 } 116 }
115 } 117 }
116 }, 118 },
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index 593b4ea1..8a4073c9 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -1,4 +1,4 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<!-- <copyright> 2<!-- <copyright>
3Copyright (c) 2012, Motorola Mobility LLC. 3Copyright (c) 2012, Motorola Mobility LLC.
4All Rights Reserved. 4All Rights Reserved.
@@ -54,7 +54,6 @@ POSSIBILITY OF SUCH DAMAGE.
54 "playheadmarker": {"#": "playhead_marker"}, 54 "playheadmarker": {"#": "playhead_marker"},
55 "timetext" : {"#": "time_text"}, 55 "timetext" : {"#": "time_text"},
56 "timebar" : {"#": "time_bar"}, 56 "timebar" : {"#": "time_bar"},
57 "container_tracks" : {"#" : "container-tracks"},
58 "end_hottext" : {"@" : "endHottext"}, 57 "end_hottext" : {"@" : "endHottext"},
59 "container_layers" : {"#" : "container-layers"}, 58 "container_layers" : {"#" : "container-layers"},
60 "container_tracks" : {"#" : "container-tracks"}, 59 "container_tracks" : {"#" : "container-tracks"},
@@ -62,9 +61,23 @@ POSSIBILITY OF SUCH DAMAGE.
62 "checkable_animated" : {"#" : "checkable_animated"}, 61 "checkable_animated" : {"#" : "checkable_animated"},
63 "tl_configbutton" : {"#" : "tl-configbutton"}, 62 "tl_configbutton" : {"#" : "tl-configbutton"},
64 "checkable_lock" : {"#" : "checkable_lock"}, 63 "checkable_lock" : {"#" : "checkable_lock"},
65 "checkable_visible":{"#" : "checkable_visible"}, 64 "checkable_visible":{"#" : "checkable_visible"}
66 "play_button" : {"#" : "play_button"}, 65
67 "zoom_slider" : {"@" : "timelineZoomSlider"} 66 }
67 },
68
69 "playButton": {
70 "prototype": "montage/ui/toggle-button.reel",
71 "properties": {
72 "element": {"#": "play_button"},
73 "identifier": "playButton",
74 "pressedClass": "pausebutton",
75 "pressedLabel": "",
76 "unpressedLabel": "",
77 "pressed": false
78 },
79 "bindings": {
80 "pressed": {"<->": "@owner.stage.timelinePlay"}
68 } 81 }
69 }, 82 },
70 83
@@ -191,7 +204,7 @@ POSSIBILITY OF SUCH DAMAGE.
191 <div data-montage-id="leftpane_inside" class="leftinside"> 204 <div data-montage-id="leftpane_inside" class="leftinside">
192 <div data-montage-id="timeline_controller" class="timelinecontroller"> 205 <div data-montage-id="timeline_controller" class="timelinecontroller">
193 <div data-montage-id="timeline_controls" class="timelinecontrols"> 206 <div data-montage-id="timeline_controls" class="timelinecontrols">
194 <div data-montage-id="play_button" class="playbutton"></div> 207 <button data-montage-id="play_button" class="playbutton"></button>
195 <div data-montage-id="time_text" class="timetext">00:00:00</div> 208 <div data-montage-id="time_text" class="timetext">00:00:00</div>
196 </div> 209 </div>
197 </div> 210 </div>
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 69fe254b..e037cccb 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -36,6 +36,21 @@ var Montage = require("montage/core/core").Montage,
36 36
37var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { 37var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
38 38
39 _stage: {
40 value: null
41 },
42
43 stage: {
44 get: function() {
45 return this._stage;
46 },
47 set: function(value) {
48 if(value) {
49 this._stage = value;
50 }
51 }
52 },
53
39 /* === BEGIN: Models === */ 54 /* === BEGIN: Models === */
40 _user_layers: { 55 _user_layers: {
41 value: null 56 value: null
@@ -1015,7 +1030,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1015 this.eventManager.addEventListener("updatedID", this.handleLayerIdUpdate.bind(this), false); 1030 this.eventManager.addEventListener("updatedID", this.handleLayerIdUpdate.bind(this), false);
1016 this.checkable_lock.addEventListener("click",this.handleLockLayerClick.bind(this),false); 1031 this.checkable_lock.addEventListener("click",this.handleLockLayerClick.bind(this),false);
1017 this.checkable_visible.addEventListener("click",this.handleLayerVisibleClick.bind(this),false); 1032 this.checkable_visible.addEventListener("click",this.handleLayerVisibleClick.bind(this),false);