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/elements/shapes-controller.js26
-rw-r--r--js/controllers/styles-controller.js2
-rw-r--r--js/data/pi/pi-data.js38
-rw-r--r--js/data/tools-data.js6
-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/mediators/keyboard-mediator.js6
-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/content.reel/content.js18
-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
32 files changed, 385 insertions, 373 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 9b13e703..65d26bdd 100644
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -204,36 +204,35 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
204 } 204 }
205 else 205 else
206 { 206 {
207 // TODO - for now, just return the identity matrix 207 var mat;
208 return Matrix.I(4); 208
209// var mat; 209 if (el)
210// 210 {
211// if (elt) 211 var xformStr = this.application.ninja.elementMediator.getProperty(el, "-webkit-transform");
212// { 212 if (xformStr)
213// var xformStr = ElementsMediator.getProperty(elt, "-webkit-transform"); 213 mat = this.transformStringToMat( xformStr );
214// if (xformStr) 214 if (!mat)
215// mat = this.transformStringToMat( xformStr ); 215 mat = Matrix.I(4);
216// if (!mat) 216
217// mat = Matrix.I(4); 217 var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom");
218// 218 if (zoom)
219// if (elt.style && elt.style.zoom) 219 {
220// { 220 zoom = Number(zoom);
221// var zoom = Number(elt.style.zoom); 221 if (zoom != 1)
222// if (zoom != 1) 222 {
223// { 223 var zoomMat = Matrix.create( [
224// var zoomMat = Matrix.create( [ 224 [ zoom, 0, 0, 0],
225// [ zoom, 0, 0, 0], 225 [ 0, zoom, 0, 0],
226// [ 0, zoom, 0, 0], 226 [ 0, 0, zoom, 0],
227// [ 0, 0, zoom, 0], 227 [ 0, 0, 0, 1]
228// [ 0, 0, 0, 1] 228 ] );
229// ] ); 229 glmat4.multiply( zoomMat, mat, mat );
230// glmat4.multiply( zoomMat, mat, mat ); 230 }
231// } 231 }
232// } 232 }
233// } 233
234// 234 el.elementModel.props3D.matrix3d = mat;
235// elt.elementModel.props3D.matrix3d = mat; 235 return mat;
236// return mat;
237 } 236 }
238 } 237 }
239 }, 238 },
@@ -284,7 +283,7 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
284 el.elementModel.props3D.matrix3d = mat; 283 el.elementModel.props3D.matrix3d = mat;
285 el.elementModel.props3D.perspectiveDist = dist; 284 el.elementModel.props3D.perspectiveDist = dist;
286 285
287// if(update3DModel) 286 if(update3DModel)
288 { 287 {
289 this._update3DProperties(el, mat, dist); 288 this._update3DProperties(el, mat, dist);
290 } 289 }
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 1717db94..5efbccd0 100644
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -24,6 +24,26 @@ exports.ShapesController = Montage.create(CanvasController, {
24 el.elementModel.shapeModel.GLGeomObj.setInnerRadius(val/100); 24 el.elementModel.shapeModel.GLGeomObj.setInnerRadius(val/100);
25 el.elementModel.shapeModel.GLGeomObj.buildBuffers(); 25 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
26 break; 26 break;
27 case "tlRadius":
28 this.setShapeProperty(el, "tlRadius", value);
29 el.elementModel.shapeModel.GLGeomObj.setTLRadius(val);
30 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
31 break;
32 case "trRadius":
33 this.setShapeProperty(el, "trRadius", value);
34 el.elementModel.shapeModel.GLGeomObj.setTRRadius(val);
35 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
36 break;
37 case "blRadius":
38 this.setShapeProperty(el, "blRadius", value);
39 el.elementModel.shapeModel.GLGeomObj.setBLRadius(val);
40 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
41 break;
42 case "brRadius":
43 this.setShapeProperty(el, "brRadius", value);
44 el.elementModel.shapeModel.GLGeomObj.setBRRadius(val);
45 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
46 break;
27 case "width": 47 case "width":
28 el.elementModel.shapeModel.GLGeomObj.setWidth(val); 48 el.elementModel.shapeModel.GLGeomObj.setWidth(val);
29 CanvasController.setProperty(el, p, value); 49 CanvasController.setProperty(el, p, value);
@@ -48,6 +68,12 @@ exports.ShapesController = Montage.create(CanvasController, {
48 switch(p) { 68 switch(p) {
49 case "strokeSize": 69 case "strokeSize":
50 case "innerRadius": 70 case "innerRadius":
71 case "tlRadius":
72 case "trRadius":
73 case "blRadius":
74 case "brRadius":
75 case "strokeMaterial":
76 case "fillMaterial":
51 case "border": 77 case "border":
52 case "background": 78 case "background":
53 return this.getShapeProperty(el, p); 79 return this.getShapeProperty(el, p);