aboutsummaryrefslogtreecommitdiff
path: root/js/clipboard
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-09 12:18:15 -0700
committerValerio Virgillito2012-07-09 12:18:15 -0700
commit961d9f223b279bf0f81468dca6b075e7a4be0e30 (patch)
treef3b1fea9b729f7d0f4016a46722c56feef398f39 /js/clipboard
parent5da15ba91868fe67dac1c3fb60ff7be2e435be69 (diff)
parentfdf2411fbf8d2d5ec710dded859bb5fa29e867d6 (diff)
downloadninja-961d9f223b279bf0f81468dca6b075e7a4be0e30.tar.gz
Merge pull request #368 from mqg734/CopyPasteWebGL
IKNinja-1736 and IKNinja-1802 - Copy paste WebGL bugs.
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 d0ee5997..627267fa 100644
--- a/js/clipboard/internal-ops/elements-clipboard-agent.js
+++ b/js/clipboard/internal-ops/elements-clipboard-agent.js
@@ -267,7 +267,10 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com
267 styles = null; 267 styles = null;
268 } 268 }
269 269
270 var addDelegate = this.application.ninja.elementMediator.addDelegate;
271 this.application.ninja.elementMediator.addDelegate = null;
270 this.application.ninja.elementMediator.addElements(canvas, styles, false); 272 this.application.ninja.elementMediator.addElements(canvas, styles, false);
273 this.application.ninja.elementMediator.addDelegate = addDelegate;
271 274
272 worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null; 275 worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null;
273 if(worldData) 276 if(worldData)
@@ -362,6 +365,8 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com
362 newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px"; 365 newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px";
363 newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px"; 366 newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px";
364 367
368 var addDelegate = this.application.ninja.elementMediator.addDelegate;
369 this.application.ninja.elementMediator.addDelegate = null;
365 if(!styles || (styles && !styles.position)){ 370 if(!styles || (styles && !styles.position)){
366 this.application.ninja.elementMediator.addElements(element, null, false); 371 this.application.ninja.elementMediator.addElements(element, null, false);
367 }else if(styles && (styles.position === "absolute")){ 372 }else if(styles && (styles.position === "absolute")){
@@ -375,6 +380,7 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com
375 380
376 this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace 381 this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace
377 } 382 }
383 this.application.ninja.elementMediator.addDelegate = addDelegate;
378 } 384 }
379 }, 385 },
380 386