aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-02 18:04:37 -0800
committerJose Antonio Marquez2012-02-02 18:04:37 -0800
commit7959d2ecc6e8b1799307de1ceab1112b8ab58e8d (patch)
treece4e32578e1af4d49b8375933a6b7edd0a095b0f /js/controllers
parent83ac41dd75ec551cdb03252e0bf3081182517d05 (diff)
parentc630ead20487c3948fa36448d3e7d5f7b5cba782 (diff)
downloadninja-7959d2ecc6e8b1799307de1ceab1112b8ab58e8d.tar.gz
Merge branch 'refs/heads/NinjaInternal' into Color
Conflicts: js/controllers/elements/shapes-controller.js js/data/pi/pi-data.js js/panels/properties/content.reel/content.js
Diffstat (limited to 'js/controllers')
-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
3 files changed, 38 insertions, 39 deletions
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