aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/element-controller.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-02 18:00:45 -0800
committerJose Antonio Marquez2012-02-02 18:00:45 -0800
commit04d89daed90c35a4393773ca2e2d0ac3a4c15cd4 (patch)
treed0041abc7379ef38b20cce148e5dea6f531b8569 /js/controllers/elements/element-controller.js
parent4d8306b638c53899403a4f0328c02bf1ab893e8f (diff)
parentc630ead20487c3948fa36448d3e7d5f7b5cba782 (diff)
downloadninja-04d89daed90c35a4393773ca2e2d0ac3a4c15cd4.tar.gz
Merge branch 'refs/heads/NinjaInternal' into FileIO
Conflicts: .gitignore js/ninja.reel/ninja.js
Diffstat (limited to 'js/controllers/elements/element-controller.js')
-rwxr-xr-xjs/controllers/elements/element-controller.js61
1 files changed, 30 insertions, 31 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index f254220c..f2b54014 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -127,36 +127,35 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
127 } 127 }
128 else 128 else
129 { 129 {
130 // TODO - for now, just return the identity matrix 130 var mat;
131 return Matrix.I(4); 131
132// var mat; 132 if (el)
133// 133 {
134// if (elt) 134 var xformStr = this.application.ninja.elementMediator.getProperty(el, "-webkit-transform");
135// { 135 if (xformStr)
136// var xformStr = ElementsMediator.getProperty(elt, "-webkit-transform"); 136 mat = this.transformStringToMat( xformStr );
137// if (xformStr) 137 if (!mat)
138// mat = this.transformStringToMat( xformStr ); 138 mat = Matrix.I(4);
139// if (!mat) 139
140// mat = Matrix.I(4); 140 var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom");
141// 141 if (zoom)
142// if (elt.style && elt.style.zoom) 142 {
143// { 143 zoom = Number(zoom);
144// var zoom = Number(elt.style.zoom); 144 if (zoom != 1)
145// if (zoom != 1) 145 {
146// { 146 var zoomMat = Matrix.create( [
147// var zoomMat = Matrix.create( [ 147 [ zoom, 0, 0, 0],
148// [ zoom, 0, 0, 0], 148 [ 0, zoom, 0, 0],
149// [ 0, zoom, 0, 0], 149 [ 0, 0, zoom, 0],
150// [ 0, 0, zoom, 0], 150 [ 0, 0, 0, 1]
151// [ 0, 0, 0, 1] 151 ] );
152// ] ); 152 glmat4.multiply( zoomMat, mat, mat );
153// glmat4.multiply( zoomMat, mat, mat ); 153 }
154// } 154 }
155// } 155 }
156// } 156
157// 157 el.elementModel.props3D.matrix3d = mat;
158// elt.elementModel.props3D.matrix3d = mat; 158 return mat;
159// return mat;
160 } 159 }
161 } 160 }
162 }, 161 },
@@ -207,7 +206,7 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
207 el.elementModel.props3D.matrix3d = mat; 206 el.elementModel.props3D.matrix3d = mat;
208 el.elementModel.props3D.perspectiveDist = dist; 207 el.elementModel.props3D.perspectiveDist = dist;
209 208
210// if(update3DModel) 209 if(update3DModel)
211 { 210 {
212 this._update3DProperties(el, mat, dist); 211 this._update3DProperties(el, mat, dist);
213 } 212 }