Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy-paste objects in multiple layers #1759

Closed
mararad opened this issue Jan 12, 2021 · 5 comments
Closed

Copy-paste objects in multiple layers #1759

mararad opened this issue Jan 12, 2021 · 5 comments

Comments

@mararad
Copy link
Collaborator

mararad commented Jan 12, 2021

"For several reasons I need to use layers in my drawing. But if I copy and paste set of objects from different layers, they're all pasted into active layer only."

"Without copy paste working with layers, layers are unusable in most larger working situations where you share diagrams. Why so?

Cannot create templates with layer information, as once you copy any group of objects with layer information stored, that layer information is lost.
Cannot even build on other diagrams with layer information, since as soon as I copy paste even one single object (which is rare, you would typically start by copying atleast a part of an existing diagram with many objects), the layer setting is overwritten with the layer I happen to currently have selected, for all objects.
Why this comment? I think that the description of this card does not communicate the impact of this behavior - that it in facts makes layers unusable in any larger work setting where diagrams are shared.

One workaround could be to copy the entire diagram file and remove what you do not need, but you would still have to manually set the layer info for any new objects that you add, since copy paste cannot be used. You cannot copy groups that have the elements on different layers. Cumbersome at best."

David "Plus the copy only copies the current layer"

@mawid6
Copy link

mawid6 commented Feb 19, 2021

Layer information is lost when doing Copy-Paste

(I am the original poster of this issue) The above is a better title.
IMO - Layers are partly, but significantly broken, since:

Layer data is not retained when copy pasting objects.

But! There is a decent workaround:

Use tags!

Tags are stored with the objects and are not lost during a copy-paste operation, and they are also captured if the shapes are added to a custom shapelibrary!

To get the toggling (similar to the floating layers toolbar), you add toggle buttons with actions, like described here:
https://drawio-app.com/interactive-diagrams-with-custom-links-and-actions/

Its a bit of work, but even the toggles you set up can be grouped as one shape and reused, either via copy paste (works great) and/or in a shapes library.

Tags work as expected!

Additionally, look at the hidden tags plugin, for instance, for quick tagging of alot of shapes in a diagram.

BR! /m

@mawid6
Copy link

mawid6 commented Feb 19, 2021

Image link is broken, here is a new upload:

drawio layers bug

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

@stale stale bot added the wontfix label Jan 8, 2022
@chipbite
Copy link

Tags is now getting a UI that is similar to layers (see #1240), which makes using tags very similar to using layers - and the tags metadata is part of each object so it is not lost when doing copy paste. Works great, and currently has more flexibility than using layers.

https://www.diagrams.net/blog/tags-in-diagrams

@stale stale bot removed the wontfix label Jan 10, 2022
@stale
Copy link

stale bot commented Jul 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

@stale stale bot added the wontfix label Jul 9, 2022
@stale stale bot closed this as completed Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants