excalidraw / excalidraw Public
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
Link the text inside a shape to the shape #1010
Comments
|
Related to (and possibly blocked by) #294. Let's keep this open, but as for how to implement this, let's move there because it'll require more meta discussion. |
|
I think this issue is nicely and more generically addressed by groups. @ReneCode give it a try (select multiple elements, cmd+option+g on mac). |
|
@xixixao yes, you are right -looks better using group. Because on resize the text-element will be resized too. May be thinking about an "automatic-grouping" approach would help to make the workflow smoother, like:
|
|
Grouping text to the shape when the text is created (via double click or text tool) while the shape is selected might work. It should still not autogroup if the shape is not selected and I'm adding text inside of it. (then again any of this could be too much magic and stirring away from "just whiteboard" approach) |
|
I've tried out to make auto-grouping when the new text is inside an element. It works fine - if you leave the size of the element. But on resizing the element the text is resized too. That results a bad looking result when in a diagram with several elements with text the text size is different. may be this approach is not ideal. |
|
Using grouping to solve this case came across my mind as well, but @ReneCode has a valid point. As an interim solution maybe? |
|
I feel like it achieves the behavior we want: when you move the shape it moves the text around. Now there are some unfortunate side effects:
I feel like the downsides are greater than the wins. I feel like once the arrow linking is implemented, we can use the same link in order to move things around and it wouldn't have those drawbacks. |
|
Interesting. I didn't think you'd be able to bind arrows to text fwiw. |
|
I like the way it is done in yED, when you drag some object into some other object , if you have pressed at the time release the button, becomes a component within , and from that time on they move together whenever moves. You can still move inside , but if you try to drag outside of , then needs to grow in order to keep containing it. In order to detach from , grab it, then press move it out of and release the button. |

It can get a bit annoying when trying to move a block but it doesn't move the text inside it. Not a big issue, but I have forgotten to rubber-band (or command click) to move them together way too many times now :(
(I think there's a separate issue about linking arrows to shapes which is related)
The text was updated successfully, but these errors were encountered: