aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-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