excalidraw / excalidraw

Virtual whiteboard for sketching hand-drawn like diagrams
https://excalidraw.com
MIT License
86.77k stars 8.23k forks source link

BUG - Elements created within bounds of a group automatically added to group #8595

Open n-konig opened 1 month ago

n-konig commented 1 month ago

Not exactly sure if this is a bug or a feature - but frustrating nonetheless!

Having grouped some text and a rectangle, any text created within that group's space. Is this intentional? It means either i) additional elements that should not be grouped have to be created "on the side" and then dragged onto the scene, or ii) that the grouped objects have to be locked only to later be unlocked.

https://github.com/user-attachments/assets/d6252d52-cfeb-4388-a022-9ac6d5a0caeb

n-konig commented 1 month ago

A comment: I can see the rationale for this behavior for the Frame tool, where the purpose is to contain elements, but a grouping of objects needs to honor the deliberate inclusion (and exclusion!) of specific objects. Thanks!

imran1khan commented 1 month ago

bro it's a feature not a bug,

dwelle commented 1 month ago

No, this is actually indeed a bug!

VANSH3104 commented 1 month ago

Hey @dwelle I think @imran1khan is right I also don’t think it’s a bug. If we change this, it takes away the meaning of groups selection. If we select all elements just because one is selected, we lose the point of grouping. If we want to get a certain selection, we could just select everything, which would make a temporary group without messing up the group functionality. What do you think?

n-konig commented 1 month ago

Not sure I follow - I don't see how this has to do with the way objects in a group are selected as much as how they are assigned a group on creation. Seems rather limiting that I cannot create an object in front of a group without the object automatically being added to the group. I'd be happy to give more/different examples if this needs clarification. And like I said - this for me is what the frame tool is for.

imran1khan commented 1 month ago

I still believe that it's a feature because you can directly put a New object onto the group without any shortcut a simple strategy

VANSH3104 commented 1 month ago

@dwelle what's your thought 🤔