aboutsummaryrefslogtreecommitdiff
path: root/js/lib/NJUtils.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-04-26 13:24:51 -0700
committerValerio Virgillito2012-04-26 13:24:51 -0700
commit1ccc4d6dcff232b00763a5a49d7ad7a91f78ad3f (patch)
tree3d1f74c243cb2d12325ffba3960a63ff627e7e2c /js/lib/NJUtils.js
parentd0893407d35f4e05bbe2fd41c2b70151984fe481 (diff)
downloadninja-1ccc4d6dcff232b00763a5a49d7ad7a91f78ad3f.tar.gz
Fixing the element model and adding get element
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/lib/NJUtils.js')
-rwxr-xr-xjs/lib/NJUtils.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js
index 67bb59c4..dae128e4 100755
--- a/js/lib/NJUtils.js
+++ b/js/lib/NJUtils.js
@@ -94,10 +94,10 @@ exports.NJUtils = Object.create(Object.prototype, {
94 ///// TODO: find a different place for this function 94 ///// TODO: find a different place for this function
95 makeElementModel: { 95 makeElementModel: {
96 value: function(el, selection, controller, isShape) { 96 value: function(el, selection, controller, isShape) {
97 //el.elementModel = Montage.create(ElementModel).initialize(el.nodeName, selection, controller, isShape);
98
97 var p3d = Montage.create(Properties3D); 99 var p3d = Montage.create(Properties3D);
98 if(selection === "Stage") { 100
99 p3d.init(el, true);
100 }
101 var shapeProps = null; 101 var shapeProps = null;
102 var pi = controller + "Pi"; 102 var pi = controller + "Pi";
103 103
@@ -143,6 +143,7 @@ exports.NJUtils = Object.create(Object.prototype, {
143 isShape: { value: isShape} 143 isShape: { value: isShape}
144 }); 144 });
145 145
146
146 } 147 }
147 }, 148 },
148 149
@@ -167,15 +168,12 @@ exports.NJUtils = Object.create(Object.prototype, {
167 break; 168 break;
168 case "canvas": 169 case "canvas":
169 isShape = el.getAttribute("data-RDGE-id"); 170 isShape = el.getAttribute("data-RDGE-id");
170 if(isShape) 171 if(isShape) {
171 {
172 // TODO - Need more info about the shape 172 // TODO - Need more info about the shape
173 selection = "canvas"; 173 selection = "canvas";
174 controller = "shape"; 174 controller = "shape";
175 isShape = true; 175 isShape = true;
176 } 176 } else {
177 else
178 {
179 selection = "canvas"; 177 selection = "canvas";
180 controller = "canvas"; 178 controller = "canvas";
181 } 179 }