allen-cell-animated / website-3d-cell-viewer

Other
5 stars 4 forks source link

Fix Z slider causing errors with 2d image #269

Closed frasercl closed 3 months ago

frasercl commented 3 months ago

Review time: small (5-10min)

Resolves #263: Z slider no longer causes an error in 2D XY mode when viewing a 2D image.

The Z clipping slider isn't especially meaningful when viewing a 2d image anyways. Currently, it shows two completely immovable handles in 3d mode, and creates an error in 2d mode. So this PR is really about removing it when the image has no Z dimension in the first place.

Following feedback from @lynwilhelm and the rest of UX, removing the Z slider works like this:

Screenshots

3D mode: image

2D mode: image

ShrimpCryptid commented 3 months ago

@frasercl is this ready to merge?

interim17 commented 3 months ago

@frasercl I see two approvals on this, removing myself, but if you want eyes on this again for any reason just re-request me!