You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
I think I can hack together something for this, but it would be great if I could force certain annotations to be a fixed size. In our use case, we want to have very very consistent image tags, so removing the user's ability to set or resize would be great.
I would picture it as a button outside of the annotation where I can programmatically include an annotation config option with height, width, and resizable on options?
if resize is false AND:
you set a static height, it cannot be changed
you set a static width, it cannot be changed
if resize is true and either is set, it is the initial value but can be changed.
If you think this would be useful I would actually love to attempt to contribute a change for it.
The workaround I can think of now is subscribing to an event, seeing if the annotation label matches one of our fixed size options, and forcing the size in the event the user has attempted to resize.
The text was updated successfully, but these errors were encountered:
I agree, this could be useful to others. I wouldn't see it as a core feature though. IMO this would work really well as a plugin.
The workaround you're suggesting would currently work I think. It's not possible to update the shape programmatically while the annotation is being edited. The way to do it would be to write your own tool (something like a "Fixed Size Rectangle Tool" plugin). That would take pre-set width and height as config options, and only allow move when it's being edited, but not resize.
The Selector Pack provides a basic framework + examples for how to build tool plugins. The original rectangle plugin is part of the core codebase here, and should be reusable almost completely.
awesome. thanks for the quick reply. I'll take some time to look into this. this is a super cool project and your responsiveness is WILD.
let me poke around a bit and see if I can come up with something! I may have a little time this weekend to get my feet wet, but my schedule is a little crazy sometimes
I think I can hack together something for this, but it would be great if I could force certain annotations to be a fixed size. In our use case, we want to have very very consistent image tags, so removing the user's ability to set or resize would be great.
I would picture it as a button outside of the annotation where I can programmatically include an annotation config option with height, width, and resizable on options?
if resize is false AND:
if resize is true and either is set, it is the initial value but can be changed.
If you think this would be useful I would actually love to attempt to contribute a change for it.
The workaround I can think of now is subscribing to an event, seeing if the annotation label matches one of our fixed size options, and forcing the size in the event the user has attempted to resize.
The text was updated successfully, but these errors were encountered: