From fdf2411fbf8d2d5ec710dded859bb5fa29e867d6 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 2 Jul 2012 13:29:02 -0700 Subject: IKNinja-1736 and IKNinja-1802 - Copy paste WebGL bugs. Signed-off-by: Nivesh Rajbhandari --- js/clipboard/internal-ops/elements-clipboard-agent.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/clipboard') 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 styles = null; } + var addDelegate = this.application.ninja.elementMediator.addDelegate; + this.application.ninja.elementMediator.addDelegate = null; this.application.ninja.elementMediator.addElements(canvas, styles, false); + this.application.ninja.elementMediator.addDelegate = addDelegate; worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null; if(worldData) @@ -338,11 +341,14 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px"; newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px"; + var addDelegate = this.application.ninja.elementMediator.addDelegate; + this.application.ninja.elementMediator.addDelegate = null; if(!styles || (styles && !styles.position)){ this.application.ninja.elementMediator.addElements(element, null, false); }else if(styles && (styles.position === "absolute")){ this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace } + this.application.ninja.elementMediator.addDelegate = addDelegate; } }, -- cgit v1.2.3