diff options
author | Armen Kesablyan | 2012-07-02 13:20:43 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-07-02 13:20:43 -0700 |
commit | 5a6b1fcf207817a7aa0ba7d0c1bea90f0ee5e8cb (patch) | |
tree | af71b72b828d942ebf11f565b7c9ccff0798343d /js/clipboard/internal-ops | |
parent | 8966fc4903f0eec61816d9b9bdbcac9b7d99c320 (diff) | |
parent | 526b9d76686323f488f1b26175440172b715d808 (diff) | |
download | ninja-5a6b1fcf207817a7aa0ba7d0c1bea90f0ee5e8cb.tar.gz |
Merge branch 'refs/heads/master' into GIO-TextTool
Diffstat (limited to 'js/clipboard/internal-ops')
-rw-r--r-- | js/clipboard/internal-ops/elements-clipboard-agent.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/clipboard/internal-ops/elements-clipboard-agent.js b/js/clipboard/internal-ops/elements-clipboard-agent.js index cd8de46e..1a4bfdba 100644 --- a/js/clipboard/internal-ops/elements-clipboard-agent.js +++ b/js/clipboard/internal-ops/elements-clipboard-agent.js | |||
@@ -232,7 +232,8 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
232 | canvas.height = sourceCanvas.height; | 232 | canvas.height = sourceCanvas.height; |
233 | //end - clone copied canvas | 233 | //end - clone copied canvas |
234 | 234 | ||
235 | if (!canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", document.application.njUtils.generateRandom() ); | 235 | //genenerate data-RDGE-id only for shapes |
236 | if (sourceCanvas.elementModel.shapeModel && !canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", document.application.njUtils.generateRandom() ); | ||
236 | 237 | ||
237 | if(sourceCanvas.ownerDocument.defaultView.getComputedStyle(sourceCanvas).getPropertyValue("position") === "absolute"){ | 238 | if(sourceCanvas.ownerDocument.defaultView.getComputedStyle(sourceCanvas).getPropertyValue("position") === "absolute"){ |
238 | styles = canvas.elementModel.data || {}; | 239 | styles = canvas.elementModel.data || {}; |
@@ -275,7 +276,8 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
275 | canvas.width = styles.width; | 276 | canvas.width = styles.width; |
276 | canvas.height = styles.height; | 277 | canvas.height = styles.height; |
277 | 278 | ||
278 | if (!canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", document.application.njUtils.generateRandom() ); | 279 | //genenerate data-RDGE-id only for shapes |
280 | if (worldJson && !canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", document.application.njUtils.generateRandom() ); | ||
279 | 281 | ||
280 | this.pastePositioned(canvas, styles, false/*from copy*/); | 282 | this.pastePositioned(canvas, styles, false/*from copy*/); |
281 | 283 | ||