aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/element-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements/element-controller.js')
-rwxr-xr-xjs/controllers/elements/element-controller.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 9f00604f..b35251ad 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -51,23 +51,6 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
51 51
52 setAttribute: { 52 setAttribute: {
53 value: function(el, att, value) { 53 value: function(el, att, value) {
54 if(att === "id") {
55 if(value === "") {
56 el.setAttribute(att, value);
57 return;
58 }
59
60 // Then check if this is a valid id by the following spec: http://www.w3.org/TR/REC-html40/types.html#h-6.2
61 var regexID = /^([a-zA-Z])+([a-zA-Z0-9_\.\:\-])+/;
62 if(!regexID.test(value)) {
63 alert("Invalid ID");
64 return;
65 } else if (this.application.ninja.currentDocument._document.getElementById(value) !== null) {
66 alert("The following ID: " + value + " is already in Use");
67 }
68
69 }
70
71 el.setAttribute(att, value); 54 el.setAttribute(att, value);
72 } 55 }
73 }, 56 },
@@ -245,22 +228,6 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
245 mat = this.transformStringToMat( xformStr ); 228 mat = this.transformStringToMat( xformStr );
246 if (!mat) 229 if (!mat)
247 mat = Matrix.I(4); 230 mat = Matrix.I(4);
248
249 var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom");
250 if (zoom)
251 {
252 zoom = Number(zoom);
253 if (zoom != 1)
254 {
255 var zoomMat = Matrix.create( [
256 [ zoom, 0, 0, 0],
257 [ 0, zoom, 0, 0],
258 [ 0, 0, zoom, 0],
259 [ 0, 0, 0, 1]
260 ] );
261 glmat4.multiply( zoomMat, mat, mat );
262 }
263 }
264 } 231 }
265 232
266 el.elementModel.props3D.matrix3d = mat; 233 el.elementModel.props3D.matrix3d = mat;