chenbo007 / svg-edit

Automatically exported from code.google.com/p/svg-edit
0 stars 0 forks source link

Copy/Paste #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
SVG-edit should definitely provide the ability to copy/paste (i.e. clone)
an element.  This is a pretty easy feature.  Here are the requirements:

1) New Copy and Paste buttons are required

2) Tied to C and V keystrokes, respectively

3) Copy is only available when only one element is selected

4) Paste is only available when a copy operation has been done

5) When copy is performed, SVG-edit should deep clone the selected node,
see DOM Level 2:
http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-3A0ED0A4 and keep a copy
in memory (overwriting any previously copied element).

6) When paste is performed, the cloned node should be given a new unique id
and inserted into the document (appendChild)

7) Copy is not undo-able (but the result of Paste is undo-able)

Future enhancements not covered by this issue:

- offsetting the new element by 50x50 pixels or something but that gets a
little bit more complicated for path elements

- allowing copy and paste of more than one element at a time

Original issue reported on code.google.com by codedr...@gmail.com on 1 Jul 2009 at 7:17

GoogleCodeExporter commented 9 years ago
Implemented all the requirements above as well as the two 'future enhancements' 
on
the train today, r320.  Only thing missing now is some artwork for the 
Copy/Paste
buttons.

Original comment by codedr...@gmail.com on 13 Jul 2009 at 1:51