mlexchange / mlex_highres_segmentation

A Dash interface for ML-based segmentation of user-annotated large multi-dimensional image data
Other
5 stars 4 forks source link

Fix image bounds when browser window resizes #89

Open hannahker opened 1 year ago

hannahker commented 1 year ago

Resizing the browser window results in the image not fully able to occupy the available space on zooming: see the white space on the right in the screenshot below.

My guess is that this is because the get_container_size() clientside callback only triggers on initial page load, and should also be triggered when the user resizes the window.

cleaaum commented 1 year ago

Putting this issue on hold for now as we could not find an elegant solution yet. Approaches/ideas we tried:

hannahker commented 1 year ago

Moving this back to "Needs refinement" for now.

hannahker commented 1 year ago

@danton267 assigning this over to you to implement the solution you've scoped using the dash_breakpoints component.

cleaaum commented 1 year ago

I can go over the formula to adjust the browser window if you'd like @danton267 as it took me awhile to figure out.

hannahker commented 11 months ago

After discussing internally, we're de-prioritizing this ticket for the time being. @danton267 was able to get the dash_breakpoints components to fire without manually setting breakpoints, but this results in poor performance as the callback is triggered far too many times on browser resize as the event fires continually throughout the resizing action (not just on mouse up). Further investigation is needed here to determine if there's some way to resolve this elegantly.

See these (now closed) PRs for relevant WIP: