aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
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/DragDrop.js161
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js104
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js29
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js384
-rw-r--r--js/panels/Timeline/Span.reel/Span.js192
-rw-r--r--js/panels/Timeline/Style.reel/Style.js695
-rw-r--r--js/panels/Timeline/Style.reel/css/Style.css124
-rw-r--r--js/panels/Timeline/Style.reel/scss/Style.scss2
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html24
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js2834
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css128
-rwxr-xr-xjs/panels/Timeline/TimelinePanel.reel/images/knob.pngbin0 -> 1036 bytes
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss53
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js993
-rw-r--r--js/panels/Timeline/Track.reel/Track.html88
-rw-r--r--js/panels/Timeline/Track.reel/Track.js212
-rw-r--r--js/panels/Timeline/Track.reel/css/Track.css57
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/TrackSpacer.html55
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/TrackSpacer.js46
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/css/TrackSpacer.css36
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js145
-rw-r--r--js/panels/css-panel/styles-view-delegate.js3
25 files changed, 2890 insertions, 3509 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/DragDrop.js b/js/panels/Timeline/DragDrop.js
deleted file mode 100644
index b13df482..00000000
--- a/js/panels/Timeline/DragDrop.js
+++ /dev/null
@@ -1,161 +0,0 @@
1/* <copyright>
2Copyright (c) 2012, Motorola Mobility LLC.
3All Rights Reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
10
11* Redistributions in binary form must reproduce the above copyright notice,
12 this list of conditions and the following disclaimer in the documentation
13 and/or other materials provided with the distribution.
14
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.
18
19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29POSSIBILITY OF SUCH DAMAGE.
30</copyright> */
31
32var Montage = require("montage/core/core").Montage;
33var Composer = require("montage/ui/composer/composer").Composer;
34
35exports.DragDropComposer = Montage.create(Composer, {
36
37 draggable: {
38 value: true
39 },
40
41 droppable: {
42 value: true
43 },
44
45 identifier: {
46 value: "generic"
47 },
48
49 _dragover: {
50 value: false
51 },
52
53 load: {
54 value: function() {
55 //TODO: to make this work even better check to see if this is a component or not
56 //right now it does not support data-montage id's
57 this.element.addEventListener("mouseover", this, true);
58 this.element.addEventListener("mouseout", this, true);
59 this.component.element.addEventListener("dragenter", this, true);
60 this.component.element.addEventListener("dragleave", this, true);
61 this.component.element.addEventListener("dragend", this, true);
62 this.component.element.addEventListener("drop", this, true);
63 this.component.element.addEventListener("dragover", this, true);
64 this.component.element.addEventListener("dragstart", this, true);
65 }
66 },
67
68 unload: {
69 value: function() {
70 this.element.removeEventListener("mouseover", this, true);
71 this.element.removeEventListener("mouseout", this, true);
72 this.component.element.removeEventListener("dragenter", this, true);
73 this.component.element.removeEventListener("dragleave", this, true);
74 this.component.element.removeEventListener("dragend", this, true);
75 this.component.element.removeEventListener("drop", this, true);
76 this.component.element.removeEventListener("dragover", this, true);
77 this.component.element.removeEventListener("dragstart", this, true);
78 }
79 },
80
81 captureMouseover: {
82 value: function(e) {
83 if(this.draggable) {
84 this.component.element.draggable = true;
85 }
86