aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/Materials/Materials.xml2
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.html8
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.js121
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.css131
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html18
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js47
-rw-r--r--js/panels/Timeline/Collapser.js6
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.html11
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js123
-rw-r--r--js/panels/Timeline/Keyframe.reel/css/Keyframe.css6
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.html7
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js33
-rw-r--r--js/panels/Timeline/Layer.reel/css/Layer.css117
-rw-r--r--js/panels/Timeline/Layer.reel/scss/Layer.scss23
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.html29
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js21
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/css/PropertyTrack.css19
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/scss/PropertyTrack.scss27
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/scss/config.rb9
-rw-r--r--js/panels/Timeline/Span.reel/Span.html11
-rw-r--r--js/panels/Timeline/Span.reel/Span.js17
-rw-r--r--js/panels/Timeline/Span.reel/css/Span.css6
-rw-r--r--js/panels/Timeline/Style.reel/Style.html5
-rw-r--r--js/panels/Timeline/Style.reel/Style.js6
-rw-r--r--js/panels/Timeline/Style.reel/scss/Style.scss12
-rw-r--r--[-rwxr-xr-x]js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html75
-rw-r--r--[-rwxr-xr-x]js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js222
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css31
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html107
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js339
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css63
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/scss/TimelineTrack.scss20
-rw-r--r--js/panels/Timeline/Track.reel/Track.html5
-rw-r--r--js/panels/Timeline/Track.reel/Track.js6
-rw-r--r--js/panels/Timeline/Track.reel/css/Track.css6
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/TrackSpacer.html5
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/TrackSpacer.js6
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/css/TrackSpacer.css6
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.html21
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js120
-rw-r--r--js/panels/Timeline/Tween.reel/css/Tween.css6
-rw-r--r--js/panels/presets/content.reel/content.css6
-rw-r--r--js/panels/presets/style-presets.reel/style-presets.css5
-rw-r--r--js/panels/presets/transitions-presets.reel/transitions-presets.css5
-rwxr-xr-xjs/panels/properties/content.reel/content.js17
45 files changed, 1162 insertions, 724 deletions
diff --git a/js/panels/Materials/Materials.xml b/js/panels/Materials/Materials.xml
index e955623a..a958575e 100755
--- a/js/panels/Materials/Materials.xml
+++ b/js/panels/Materials/Materials.xml
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="ISO-8859-1"?> 1<?xml version="1.0" encoding="ISO-8859-1"?>
2<tree id="Materials"> 2<tree id="Materials">
3 <folder id="ninjaMaterials" label="Ninja Materials"> 3 <folder id="ninjaMaterials" label="Ninja Materials">
4 <leaf id="UberMaterial" label="Uber" /> 4 <leaf id="UberMaterial" label="Uber" />
5 <leaf id="BumpMetalMaterial" label="Bump Metal" /> 5 <leaf id="BumpMetalMaterial" label="Bump Metal" />
6 <leaf id="LinearGradientMaterial" label="Linear Gradient" /> 6 <leaf id="LinearGradientMaterial" label="Linear Gradient" />
7 <leaf id="RadialGradientMaterial" label="Radial Gradient" /> 7 <leaf id="RadialGradientMaterial" label="Radial Gradient" />
diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
index eede02bd..6ba4ac75 100755
--- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
+++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
@@ -10,14 +10,18 @@
10 <link rel="stylesheet" type="text/css" href="materials-library-panel.css"> 10 <link rel="stylesheet" type="text/css" href="materials-library-panel.css">
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 12 {
13 "materialInfo": {
14 "module": "js/panels/Materials/materials-popup.reel",
15 "name": "MaterialsPopup"
16 },
13 "owner": { 17 "owner": {
14 "module": "js/panels/Materials/materials-library-panel.reel", 18 "module": "js/panels/Materials/materials-library-panel.reel",
15 "name": "MaterialsLibraryPanels", 19 "name": "MaterialsLibraryPanels",
16 "properties": { 20 "properties": {
17 "element": {"#": "materials_library_panel"} 21 "element": {"#": "materials_library_panel"},
22 "_materialInfo": {"@": "materialInfo"}
18 } 23 }
19 } 24 }
20
21 } 25 }
22 </script> 26 </script>
23 27
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 f97e1a27..b16c4376 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
@@ -7,7 +7,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
7var Tree = require("js/components/tree.reel").Tree, 7var Tree = require("js/components/tree.reel").Tree,
8 Button = require("js/components/button.reel").Button, 8 Button = require("js/components/button.reel").Button,
9 MaterialsPopup = require("js/panels/Materials/materials-popup.reel").MaterialsPopup, 9 MaterialsPopup = require("js/panels/Materials/materials-popup.reel").MaterialsPopup,
10 PopupMananger = require("js/components/popup-manager.reel").PopupMananger; 10 PopupMananger = require("js/components/popup-manager.reel").PopupMananger,
11 Popup = require("montage/ui/popup/popup.reel").Popup;
11 12
12exports.MaterialsLibraryPanel = (require("montage/core/core").Montage).create(require("montage/ui/component").Component, { 13exports.MaterialsLibraryPanel = (require("montage/core/core").Montage).create(require("montage/ui/component").Component, {
13 14
@@ -92,20 +93,7 @@ exports.MaterialsLibraryPanel = (require("montage/core/core").Montage).create(re
92 captureChange: { 93 captureChange: {
93 value:function(e) { 94 value:function(e) {
94 var tNode = e._event.treeNode; 95 var tNode = e._event.treeNode;
95 var left, top; 96 this._showMaterialPopup(tNode.id);
96 //TODO: Figure out if this is the best way to detect where user clicked
97 var mouseEvent = e._event.mouseEvent;
98 if (mouseEvent.clientX && mouseEvent.clientY) {
99 if (mouseEvent.clientX > (parseInt(document.width)/2)) {
100 left = mouseEvent.clientX - mouseEvent.offsetX-2;
101 top = mouseEvent.currentTarget.clientHeight/2+mouseEvent.clientY - mouseEvent.offsetY;
102 } else {
103 left = mouseEvent.clientX - mouseEvent.offsetX+parseInt(mouseEvent.currentTarget.clientWidth);
104 top = mouseEvent.clientY - mouseEvent.offsetY;
105 }
106 }
107
108 this._showMaterialPopup(left + 'px', top + 'px', 'right', 'top', tNode.id);
109 } 97 }
110 }, 98 },
111 99
@@ -113,93 +101,34 @@ exports.MaterialsLibraryPanel = (require("montage/core/core").Montage).create(re
113 enumerable:true, 101 enumerable:true,
114 value:null 102 value:null
115 }, 103 },
104
105 _materialInfo: {
106 enumerable:true
107 },
116 108
117 _showMaterialPopup: { 109 _showMaterialPopup: {
118 enumerable: false, 110 enumerable: false,
119 value: function (x, y, side, align, materialID) { 111 value: function (materialID) {
120 if (this._materialPopup && this._materialPopup.opened) { 112
121 if (this._materialPopup.popup.position.x === x && this._materialPopup.popup.position.y === y) { 113 if(!this._materialPopup)
122 this._hideMaterialPopup(); 114 {
123 } else { 115 this._materialPopup = Popup.create();
124 this._materialPopup.popup.position = {x: x, y: y}; 116 this._materialPopup.content = this._materialInfo;
125 this._materialPopup.popup.tooltip = {side: side, align: align}; 117 this._materialPopup.modal = false;
126 this._materialPopup.popup.base.loadMaterials(materialID); 118 this.eventManager.addEventListener("hideMaterialPopup", this, false);
127 //TODO: Tooltip needs to be fixed to allow aligning to change on fly 119 this._materialPopup.addEventListener("show", this, false);
128 //this._materialPopup.popup.drawTooltip(); 120 }
129 } 121 this._materialPopup.show();
130 } else { 122 this._materialInfo.loadMaterials(materialID);
131 ////////////////////////////////////////////////////
132 //Creating popup from m-js component
133 var popup = document.createElement('div');
134 var content = document.createElement('div');
135