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

Add dropdown to enable drawing shapes with fixed aspect ratios/sizes #197

Merged
merged 4 commits into from
Jul 22, 2022

Conversation

mvandenburgh
Copy link
Member

Closes #26

@manthey
Copy link
Contributor

manthey commented Jul 5, 2022

We weren't passing the mode options through. I've made a PR in large_image to do this: girder/large_image#881
You'll need to change the code to something like:

const options = {modeOptions: {}};
options.modeOptions.constraint = { width: this._editOptions.fixed_width, height: this._editOptions.fixed_height };

@mvandenburgh mvandenburgh force-pushed the fixed-aspect-ratio-size branch from e3afd69 to a110703 Compare July 5, 2022 15:45
@mvandenburgh mvandenburgh force-pushed the fixed-aspect-ratio-size branch from a110703 to a347a26 Compare July 12, 2022 19:11
@mvandenburgh mvandenburgh force-pushed the fixed-aspect-ratio-size branch 3 times, most recently from 2a05652 to 1f74f80 Compare July 21, 2022 17:12
Any open dropdowns are closed automatically when a new one is opened
Bootstrap seems to behave weird when trying to set the `checked` attribute on a radio button in advance, so just use jQuery to do it instead.
@mvandenburgh mvandenburgh force-pushed the fixed-aspect-ratio-size branch from 1f74f80 to dd0cf60 Compare July 21, 2022 17:48
@mvandenburgh mvandenburgh marked this pull request as ready for review July 21, 2022 17:57
@mvandenburgh mvandenburgh requested a review from manthey July 21, 2022 17:57
@manthey
Copy link
Contributor

manthey commented Jul 22, 2022

I noticed that the dropdown arrows on the control panels were inconsistent because of how I had implemented them. I pushed a change to fix that.

Otherwise, this is working for me. I'll approve this -- if you don't like my changes, feel free to un-approve and handle things a different way.

@manthey
Copy link
Contributor

manthey commented Jul 22, 2022

I think you'll be able to merge without the coverage test passing.

@mvandenburgh mvandenburgh merged commit 0e5c4de into master Jul 22, 2022
@mvandenburgh mvandenburgh deleted the fixed-aspect-ratio-size branch July 22, 2022 20:02
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.

Need ability to create fixed-size rectangular annotations
2 participants