aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/components/tools-properties/rect-properties.reel/rect-properties.js2
-rw-r--r--js/components/tree.reel/tree.js2
-rw-r--r--js/controllers/elements/canvas-controller.js14
-rw-r--r--js/controllers/elements/element-controller.js61
-rw-r--r--js/controllers/styles-controller.js2
-rw-r--r--js/helper-classes/3D/draw-utils.js28
-rw-r--r--js/helper-classes/3D/math-utils.js54
-rw-r--r--js/helper-classes/3D/snap-manager.js11
-rw-r--r--js/helper-classes/Properties3D.js82
-rw-r--r--js/helper-classes/RDGE/GLBrushStroke.js1
-rw-r--r--js/helper-classes/RDGE/GLSubpath.js1
-rw-r--r--js/mediators/element-mediator.js5
-rw-r--r--js/models/properties-3d.js6
-rw-r--r--js/ninja.reel/ninja.js15
-rw-r--r--js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js2
-rw-r--r--js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js2
-rw-r--r--js/panels/Color/colorpopup-manager.js64
-rw-r--r--js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js4
-rw-r--r--js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js6
-rw-r--r--js/panels/properties/sections/three-d-view.reel/three-d-view.html12
-rw-r--r--js/panels/properties/sections/three-d-view.reel/three-d-view.js86
-rw-r--r--js/stage/layout.js67
-rw-r--r--js/stage/stage.reel/stage.js63
-rw-r--r--js/tools/PanTool.js33
-rw-r--r--js/tools/SelectionTool.js1
-rw-r--r--js/tools/ZoomTool.js39
-rw-r--r--js/tools/drawing-tool-base.js1
27 files changed, 306 insertions, 358 deletions
diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.js b/js/components/tools-properties/rect-properties.reel/rect-properties.js
index 8d0cd21f..1e717f88 100644
--- a/js/components/tools-properties/rect-properties.reel/rect-properties.js
+++ b/js/components/tools-properties/rect-properties.reel/rect-properties.js
@@ -113,7 +113,7 @@ exports.RectProperties = Montage.create(ToolProperties, {
113 113
114 handleChange: { 114 handleChange: {
115 value: function(event) { 115 value: function(event) {
116 var hotTxt = event.currentTarget 116 var hotTxt = event.currentTarget;
117 if(hotTxt.units === "%") { 117 if(hotTxt.units === "%") {
118 if(hotTxt.value > 50) { 118 if(hotTxt.value > 50) {
119 hotTxt.maxValue = 50; 119 hotTxt.maxValue = 50;
diff --git a/js/components/tree.reel/tree.js b/js/components/tree.reel/tree.js
index 9c1b07e4..7084ba99 100644
--- a/js/components/tree.reel/tree.js
+++ b/js/components/tree.reel/tree.js
@@ -6,7 +6,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
6 6
7var Montage = require("montage/core/core").Montage; 7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component; 8var Component = require("montage/ui/component").Component;
9var nj = require("js/lib/NJUtils.js").NJUtils; 9var nj = require("js/lib/NJUtils").NJUtils;
10 10
11exports.Tree = Montage.create(Component, { 11exports.Tree = Montage.create(Component, {
12 12
diff --git a/js/controllers/elements/canvas-controller.js b/js/controllers/elements/canvas-controller.js
index 21de9879..b5df3911 100644
--- a/js/controllers/elements/canvas-controller.js
+++ b/js/controllers/elements/canvas-controller.js
@@ -34,12 +34,12 @@ exports.CanvasController = Montage.create(ElementController, {
34 } 34 }
35 } 35 }
36 }, 36 },
37 37
38 setProperties: { 38 setProperties: {
39 value: function(el, props, index) { 39 value: function(el, props, index) {
40 for(var p in props) { 40 for(var p in props) {
41 el.elementModel.controller.setProperty(el, p, props[p][index]); 41 el.elementModel.controller.setProperty(el, p, props[p][index]);
42 } 42 }
43 } 43 }
44 } 44 }
45}); \ No newline at end of file 45}); \ No newline at end of file
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 892ac2f2..65c24b46 100644
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -211,36 +211,35 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
211 } 211 }
212 else 212 else
213 { 213 {
214 // TODO - for now, just return the identity matrix 214 var mat;
215 return Matrix.I(4); 215
216// var mat; 216 if (el)
217// 217 {
218// if (elt) 218 var xformStr = this.application.ninja.elementMediator.getProperty(el, "-webkit-transform");
219// { 219 if (xformStr)
220// var xformStr = ElementsMediator.getProperty(elt, "-webkit-transform"); 220 mat = this.transformStringToMat( xformStr );
221// if (xformStr) 221 if (!mat)
222// mat = this.transformStringToMat( xformStr ); 222 mat = Matrix.I(4);
223// if (!mat) 223
224// mat = Matrix.I(4); 224 var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom");
225// 225 if (zoom)
226// if (elt.style && elt.style.zoom) 226 {
227// { 227 zoom = Number(zoom);
228// var zoom = Number(elt.style.zoom); 228 if (zoom != 1)
229// if (zoom != 1) 229 {
230// { 230 var zoomMat = Matrix.create( [
231// var zoomMat = Matrix.create( [ 231 [ zoom, 0, 0, 0],
232// [ zoom, 0, 0, 0], 232 [ 0, zoom, 0, 0],
233// [ 0, zoom, 0, 0], 233 [ 0, 0, zoom, 0],
234// [ 0, 0, zoom, 0], 234 [ 0, 0, 0, 1]
235// [ 0, 0, 0, 1] 235 ] );
236// ] ); 236 glmat4.multiply( zoomMat, mat, mat );
237// glmat4.multiply( zoomMat, mat, mat ); 237 }
238// } 238 }
239// } 239 }
240// } 240
241// 241 el.elementModel.props3D.matrix3d = mat;
242// elt.elementModel.props3D.matrix3d = mat; 242 return mat;
243// return mat;
244 } 243 }
245 } 244 }
246 }, 245 },
@@ -291,7 +290,7 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
291 el.elementModel.props3D.matrix3d = mat; 290 el.elementModel.props3D.matrix3d = mat;
292 el.elementModel.props3D.perspectiveDist = dist; 291 el.elementModel.props3D.perspectiveDist = dist;
293 292
294// if(update3DModel) 293 if(update3DModel)
295 { 294 {
296 this._update3DProperties(el, mat, dist); 295 this._update3DProperties(el, mat, dist);
297 } 296 }
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index d462bc98..afd298c9 100644
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -7,7 +7,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component, 8 Component = require("montage/ui/component").Component,
9 cssShorthandMap = require("js/panels/CSSPanel/css-shorthand-map").CSS_SHORTHAND_MAP, 9 cssShorthandMap = require("js/panels/CSSPanel/css-shorthand-map").CSS_SHORTHAND_MAP,
10 nj = require("js/lib/NJUtils.js").NJUtils; 10 nj = require("js/lib/NJUtils").NJUtils;
11 11
12/* 12/*
13 13
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index 3fd6e8fc..fd96af4d 100644
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -107,6 +107,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
107 107
108 this.eventManager.addEventListener("elementAdded", this, false); 108 this.eventManager.addEventListener("elementAdded", this, false);
109 this.eventManager.addEventListener("elementDeleted", this, false); 109 this.eventManager.addEventListener("elementDeleted", this, false);
110 this.eventManager.addEventListener("elementChange", this, false);
110 } 111 }
111 }, 112 },
112 113
@@ -124,6 +125,27 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
124 }, 125 },
125 126
126 127
128 handleElementChange: {
129 value: function(event) {
130 var els = event.detail.data.els;
131 if(els)
132 {
133 var len = els.length,
134 i = 0,
135 item,
136 el;
137
138 for(i=0; i < len; i++) {
139 item = els[i];
140 el = item._element || item;
141 el.elementModel.props3D.elementPlane.init();
142 }
143
144 this.drawWorkingPlane();
145 }
146 }
147 },
148
127 /////////////////////////////////////////////////////////////////////// 149 ///////////////////////////////////////////////////////////////////////
128 // Methods 150 // Methods
129 /////////////////////////////////////////////////////////////////////// 151 ///////////////////////////////////////////////////////////////////////
@@ -150,6 +172,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
150 plane.setElement( elt ); 172 plane.setElement( elt );
151 plane.init(); 173 plane.init();
152 this._planesArray.push( plane ); 174 this._planesArray.push( plane );
175 elt.elementModel.props3D.elementPlane = plane;
153 } 176 }
154 },