aboutsummaryrefslogtreecommitdiff
path: root/js/clipboard
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-07-02 13:29:02 -0700
committerNivesh Rajbhandari2012-07-02 13:29:02 -0700
commitfdf2411fbf8d2d5ec710dded859bb5fa29e867d6 (patch)
tree7e709bea79953b316432b91f53427266a2b2cb59 /js/clipboard
parent12de4e49a309e210c13eb40b2ffa158ef2eb54a7 (diff)
downloadninja-fdf2411fbf8d2d5ec710dded859bb5fa29e867d6.tar.gz
IKNinja-1736 and IKNinja-1802 - Copy paste WebGL bugs.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/clipboard')
-rw-r--r--js/clipboard/internal-ops/elements-clipboard-agent.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/clipboard/internal-ops/elements-clipboard-agent.js b/js/clipboard/internal-ops/elements-clipboard-agent.js
index 1a4bfdba..ef89ab35 100644
--- a/js/clipboard/internal-ops/elements-clipboard-agent.js
+++ b/js/clipboard/internal-ops/elements-clipboard-agent.js
@@ -243,7 +243,10 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com
243 styles = null; 243 styles = null;
244 } 244 }
245 245
246 var addDelegate = this.application.ninja.elementMediator.addDelegate;
247 this.application.ninja.elementMediator.addDelegate = null;
246 this.application.ninja.elementMediator.addElements(canvas, styles, false); 248 this.application.ninja.elementMediator.addElements(canvas, styles, false);
249 this.application.ninja.elementMediator.addDelegate = addDelegate;
247 250
248 worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null; 251 worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null;
249 if(worldData) 252 if(worldData)
@@ -338,11 +341,14 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com
338 newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px"; 341 newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px";
339 newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px"; 342 newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px";
340 343
344 var addDelegate = this.application.ninja.elementMediator.addDelegate;
345 this.application.ninja.elementMediator.addDelegate = null;
341 if(!styles || (styles && !styles.position)){ 346 if(!styles || (styles && !styles.position)){
342 this.application.ninja.elementMediator.addElements(element, null, false); 347 this.application.ninja.elementMediator.addElements(element, null, false);
343 }else if(styles && (styles.position === "absolute")){ 348 }else if(styles && (styles.position === "absolute")){
344 this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace 349 this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace
345 } 350 }
351 this.application.ninja.elementMediator.addDelegate = addDelegate;
346 } 352 }
347 }, 353 },
348 354