aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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