diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/clipboard/internal-ops/elements-clipboard-agent.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/clipboard/internal-ops/elements-clipboard-agent.js b/js/clipboard/internal-ops/elements-clipboard-agent.js index 14984593..d0ee5997 100644 --- a/js/clipboard/internal-ops/elements-clipboard-agent.js +++ b/js/clipboard/internal-ops/elements-clipboard-agent.js | |||
@@ -349,7 +349,7 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
349 | 349 | ||
350 | pastePositioned:{ | 350 | pastePositioned:{ |
351 | value: function(element, styles, fromCopy){// for now can wok for both in-place and centered paste | 351 | value: function(element, styles, fromCopy){// for now can wok for both in-place and centered paste |
352 | var modObject = [], x,y, newX, newY, counter; | 352 | var modObject = [], x,y, newX, newY, counter, self = this; |
353 | 353 | ||
354 | if((typeof fromCopy === "undefined") || (fromCopy && fromCopy === true)){ | 354 | if((typeof fromCopy === "undefined") || (fromCopy && fromCopy === true)){ |
355 | counter = this.pasteCounter; | 355 | counter = this.pasteCounter; |
@@ -365,6 +365,14 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
365 | if(!styles || (styles && !styles.position)){ | 365 | if(!styles || (styles && !styles.position)){ |
366 | this.application.ninja.elementMediator.addElements(element, null, false); | 366 | this.application.ninja.elementMediator.addElements(element, null, false); |
367 | }else if(styles && (styles.position === "absolute")){ | 367 | }else if(styles && (styles.position === "absolute")){ |
368 | if((element.tagName === "IMG") || (element.getAttribute("type") === "image/svg+xml")){ | ||
369 | element.onload = function(){ | ||
370 | element.onload = null; | ||
371 | //refresh selection | ||
372 | self.application.ninja.stage.needsDraw = true; | ||
373 | } | ||
374 | } | ||
375 | |||
368 | this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace | 376 | this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace |
369 | } | 377 | } |
370 | } | 378 | } |