ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 30 forks source link

Use 0.01 increment for channel sliders #468

Closed will-moore closed 1 year ago

will-moore commented 2 years ago

Fixes #467.

To test - see https://merge-ci.openmicroscopy.org/web/figure/file/95252 for example figure and images (user-3)

Screenshot 2022-06-10 at 10 59 33

dominikl commented 2 years ago

It works. But a downside is that it also applies to int type images.

will-moore commented 2 years ago

Since we don't store pixel-type info for images in figure, I've used the maximum pixel value of the range slider to determine if the slider increments should be small 0.01 or integers. The current threshold is 100. Below this we use 0.01 for slider increment. I think this mostly behaves OK. It means you can have different behaviour for different channels of an Image, but if one channel is quite dark, that's probably OK.

dominikl commented 2 years ago

👍 Looks good to me.

jburel commented 2 years ago

@will-moore is it possible to make the textbox a bit bigger to avoid the truncation?

will-moore commented 2 years ago

@jburel When are you seeing this truncation? I can't reproduce, since we only allow non-integer values in the text boxes if the max intensity is less than 100, and then it's formatted to 2 decimal places, so a max of 4 characters, which looks OK:

Screenshot 2022-07-01 at 13 44 18

will-moore commented 1 year ago

In discussion with @jburel, the truncation he was seeing was in the first screenshot above, before https://github.com/ome/omero-figure/pull/468/commits/5f0bf0f798687e69108dabb4b66d95c857b14f06 added the formatting of those text inputs. So I think this is good to merge?