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

feat: add text support #27

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ProsperBao
Copy link

I think as an SVG-based drawing tool in the browser, it should support adding text.

@antfu
Copy link
Owner

antfu commented Jul 31, 2023

Thanks! However, I think it's a pretty complex tool to implement right and provide good UX. I feel the current implementation still has a lot to improve, while honestly, it feels a bit out-of-scope. I guess it might be better to implement that in the userland? I don't really want to absorb and maintain this complexity.

@ProsperBao
Copy link
Author

Thanks! However, I think it's a pretty complex tool to implement right and provide good UX. I feel the current implementation still has a lot to improve, while honestly, it feels a bit out-of-scope. I guess it might be better to implement that in the userland? I don't really want to absorb and maintain this complexity.

Actually, my initial goal was to support the addition of text functionality in an annotation project. I couldn't find any configuration options, so I thought about adding a feature myself. Alternatively, we could add the ability to import a custom module configuration from external sources. This would allow users to add a module according to their own preferences.

@antfu
Copy link
Owner

antfu commented Aug 1, 2023

we could add the ability to import a custom module configuration from external sources. This would allow users to add a module according to their own preferences.

Yeah I think that's the best approach. Feel free to go to that direction (and we could move the text model you have there to the playground as an example)

@ProsperBao
Copy link
Author

Yeah

let me try.

@ProsperBao
Copy link
Author

I think there is still a slight issue. I am unsure how to modify the type of DrawingMode without overriding the original type.
My idea is to concatenate the keys based on options.models. However, it seems like this approach would require a lot of type inference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants