FR: duplicate drawings

It would be useful to be able to duplicate drawings (and each copy to have separate resource IDs).

Recently I've taken to writing up personal project ideas in Joplin and being able to make complex drawings is really useful in terms of visually mapping out ideas.

However, I just had an issue where I wanted to reuse a drawing I made earlier so I can show an altered version of an idea, I copied the markdown link and began editing the drawing, but when I saved it my edits were copied over to the original (for some reason, thought that by editing a drawing, Joplin would create a new resource and sub in the ID when I saved I guess :person_shrugging:)

Given that you also can't copy drawing elements out of a drawing to paste them elsewhere, it seems to me that it's impossible to duplicate a drawing without recreating it from scratch...

3 Likes

I would like this feature, too! :slight_smile:

I implemented a draft UI for this a few months ago — it adds copy/paste buttons to the "select" menu (pull request). However, I decided this menu wasn't an intuitive place for them.

An alternative could be to show these actions in long-press and context menus. In particular:

  • A menu with "copy" could be visible after selecting content in a drawing, shown just above the selection.
  • Long-pressing the screen while using the selection tool displays a menu including a "paste" action.

Note that the desktop Freehand Drawing plugin (uses the same library as the mobile drawing functionality) has a "save as copy" option. On desktop, it's also possible to copy/paste between drawings using ctrl-c and ctrl-v.

Another idea could be to allow editing multiple drawings in the same editor.

1 Like

Ah, nice work!

Though I agree it's not a super intuitive place to put them.

And on that note, if you are going to add UI on a selection, it might be good to move the "duplicate" and "delete" items into it as well, I wasn't aware they existed and were under the selection menu initially and tying them directly to the elements that were just selected would make a lot more sense. In this case "copy" should be "copy to clipboard" just to avoid confusion between "copy" and "duplicate".

Another idea could be to allow editing multiple drawings in the same editor

Could you explain that idea more? I'm picturing having two canvases open at the same time but I'm not sure how that would work on devices where screen space is already limited. Unless you had a different idea?

I was thinking of mapping different drawings to different regions of the canvas. For example,

One option could be to enter this mode if multiple drawings are selected when clicking "insert drawing", but this seems unintuitive.

1 Like

Hmm, I like the idea of being able to edit multiple drawings at the same time, that could be useful!

That said I don't think the mapping to multiple regions thing would work. One of the really useful features currently is that the canvas size adjusts to whatever is in the drawing, I'm not super sure how this would work with remapping, would you rescale it after each addition? That could be confusing for the user.

It also at least halves the amount of space a drawing has if you want to view everything.

Maybe it would be much simpler to use the ol' tried and tested tabs system, so each drawing has its own separate tabs and users navigate between them

Drawing

The names for each tab could be taken from the text half of the resource link since that's not used anywhere anyway.

As for which tabs to be opened for editing and when, I'm not sure...

1 Like

I'm linking to a prototype of the "copy"/"paste" menu item idea: prototype. See the associated pull request for a list of tasks/known issues.

The screenshot above shows one of two ways to open the selection menu — by clicking on a button just above the selection. It's also possible to open the menu by long-pressing or right-clicking.

A similar menu with only "paste" can be shown by long-pressing or right-clicking when there is no selection.

1 Like