aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAnanya Sen2012-05-16 11:51:18 -0700
committerAnanya Sen2012-05-16 11:51:18 -0700
commitdbab843c68c784579c369a64fb4f2a76c88de582 (patch)
tree74711ebeaacab5d7ba9d9074d64d689b50fafdaa /js
parent9e1ee9114e5364199acf1abb54798c81c14b9cbe (diff)
downloadninja-dbab843c68c784579c369a64fb4f2a76c88de582.tar.gz
copy/paste single webGL shape
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rw-r--r--js/controllers/clipboard-controller.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js
index 6ac90d96..e84fcac7 100644
--- a/js/controllers/clipboard-controller.js
+++ b/js/controllers/clipboard-controller.js
@@ -159,10 +159,7 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
159 159
160 if (!canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", NJUtils.generateRandom() ); 160 if (!canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", NJUtils.generateRandom() );
161 document.application.njUtils.createModelWithShape(canvas); 161 document.application.njUtils.createModelWithShape(canvas);
162// canvas.elementModel.controller = ShapesController; 162
163// if(!canvas.elementModel.shapeModel) {
164// canvas.elementModel.shapeModel = Montage.create(ShapeModel);
165// }
166 styles = canvas.elementModel.data || {}; 163 styles = canvas.elementModel.data || {};
167 styles.top = "" + (this.application.ninja.elementMediator.getProperty(this.copiedObjects, "top", parseInt) - 50) + "px"; 164 styles.top = "" + (this.application.ninja.elementMediator.getProperty(this.copiedObjects, "top", parseInt) - 50) + "px";
168 styles.left = "" + (this.application.ninja.elementMediator.getProperty(this.copiedObjects, "left", parseInt) - 50) + "px"; 165 styles.left = "" + (this.application.ninja.elementMediator.getProperty(this.copiedObjects, "left", parseInt) - 50) + "px";
@@ -182,9 +179,9 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
182 var jStr = worldData.substr( index+1 ); 179 var jStr = worldData.substr( index+1 );
183 jObj = JSON.parse( jStr ); 180 jObj = JSON.parse( jStr );
184 181
185 world = new World(canvas, jObj.useWebGl); 182 world = new World(canvas, jObj.webGL);
186 canvas.elementModel.shapeModel.GLWorld = world; 183 canvas.elementModel.shapeModel.GLWorld = world;
187 canvas.elementModel.shapeModel.useWebGl = jObj.useWebGl; 184 canvas.elementModel.shapeModel.useWebGl = jObj.webGL;
188 world.importJSON(jObj); 185 world.importJSON(jObj);
189 this.application.ninja.currentDocument.buildShapeModel( canvas.elementModel, world ); 186 this.application.ninja.currentDocument.buildShapeModel( canvas.elementModel, world );
190 } 187 }