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

Omit mag slider in TIFF export if only one mag is available #8297

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed some layout issues in the upload view. [#8231](https://github.com/scalableminds/webknossos/pull/8231)
- Fixed `FATAL: role "postgres" does not exist` error message in Docker compose. [#8240](https://github.com/scalableminds/webknossos/pull/8240)
- Fixed the Zarr 3 implementation not accepting BytesCodec without "configuration" key. [#8282](https://github.com/scalableminds/webknossos/pull/8282)
- Removed the magnification slider for the TIFF export within the download modal if only one magnification is available for the selected layer. [#8297](https://github.com/scalableminds/webknossos/pull/8297)

### Removed
- Removed support for HTTP API versions 3 and 4. [#8075](https://github.com/scalableminds/webknossos/pull/8075)
Expand Down
30 changes: 18 additions & 12 deletions frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ function _DownloadModalView({
</>
);

const onlyOneMagAvailable = selectedLayerMagInfo.getMagList().length === 1;

const tiffExportTab = (
<>
<Row>
Expand Down Expand Up @@ -642,7 +644,7 @@ function _DownloadModalView({
style={{ width: "100%" }}
/>
{boundingBoxCompatibilityAlerts}
{selectedLayerInfos.additionalAxes != null && (
{(selectedLayerInfos.additionalAxes?.length || 0) > 0 && (
<Row>
<Divider
style={{
Expand Down Expand Up @@ -670,23 +672,27 @@ function _DownloadModalView({
>
Mag
</Divider>
<Row>
<Col span={19}>
<MagSlider magnificationInfo={selectedLayerMagInfo} value={mag} onChange={setMag} />
</Col>
<Col
span={5}
style={{ display: "flex", justifyContent: "flex-end", alignItems: "center" }}
>
{mag.join("-")}
</Col>
</Row>
{!onlyOneMagAvailable ? (
<Row>
<Col span={19}>
<MagSlider magnificationInfo={selectedLayerMagInfo} value={mag} onChange={setMag} />
</Col>
<Col
span={5}
style={{ display: "flex", justifyContent: "flex-end", alignItems: "center" }}
>
{mag.join("-")}
</Col>
</Row>
) : null}
<Text
style={{
margin: "0 6px 12px",
display: "block",
}}
>
{onlyOneMagAvailable && mag.join("-")}
<br />
Estimated file size:{" "}
{estimateFileSize(selectedLayer, mag, selectedBoundingBox.boundingBox, exportFormat)}
<br />
Expand Down