ome / omero-iviewer

An OMERO.web app allowing to view images
https://www.openmicroscopy.org/omero/iviewer/
Other
18 stars 29 forks source link

Don't scale labels by default #443

Closed will-moore closed 1 year ago

will-moore commented 1 year ago

Fixes #442.

This adds a config option to disable the scaling of labels and shape-text when you zoom:

omero config set omero.web.iviewer.scale_text false

Often the behaviour of NOT scaling labels as you zoom (typical behaviour on maps etc) is preferable.

But that would be a breaking change - E.g. in this case, all the labels are 200px high, and if shown that large at lower zoom levels then they would obscure the image (and each other): https://chamber.mrc.ox.ac.uk/iviewer/?images=124

For testing, the above config has been set-up on merge-ci:

pwalczysko commented 1 year ago

Trying to compare https://merge-ci.openmicroscopy.org/web/webclient/img_detail/211615/?dataset=50619 and https://latest-ci.openmicroscopy.org/web/webclient/img_detail/85715/?dataset=43469

Not sure, maybe need an detailed explanation what is the difference in the two scalebar behaviours when zooming those images ?

will-moore commented 1 year ago

Sorry, that last commit won't be deployed on merge-ci yet. And this PR has nothing to do with scalebar. It's about how text labels scale when you zoom an image. Default behaviour is to zoom the text when you zoom. This PR and merge-ci is configured to disable that.

pwalczysko commented 1 year ago

Sorry, that last commit won't be deployed on merge-ci yet. And this PR has nothing to do with scalebar. It's about how text labels scale when you zoom an image. Default behaviour is to zoom the text when you zoom. This PR and merge-ci is configured to disable that.

Ah, sorrry, I can see it now. Yes, the text does not zoom on an image in merge-ci.

pwalczysko commented 1 year ago

Problem:

  1. Zoom out on an svs image to 30%.
  2. Draw a Text label which approx. as big as the size of the white area in the top-left corner of the screenshot below
  3. Observe that once you have finished drawing, the label jumps in size to be more than twice as big as you intended

Screenshot 2023-02-06 at 14 50 25

will-moore commented 1 year ago

Couldn't find a fix for that problem despite a few different attempts.