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

fix: Slider max now reflects zero-based indexing #334

Merged
merged 3 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

%axis-override {
/*slider settings*/
.noUi-handle {
.noUi-horizontal .noUi-handle {
box-shadow: none;
cursor: pointer;
pointer-events: inherit;
Expand Down
18 changes: 9 additions & 9 deletions src/aics-image-viewer/components/AxisClipSliders/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React, { useCallback, useEffect, useState } from "react";
import { Button, Tooltip } from "antd";
import { CaretRightOutlined, PauseOutlined } from "@ant-design/icons";
import { Volume } from "@aics/volume-viewer";
import { CaretRightOutlined, PauseOutlined } from "@ant-design/icons";
import { Button, Tooltip } from "antd";
import React, { useCallback, useEffect, useState } from "react";

import { ViewMode } from "../../shared/enums";
import { activeAxisMap, AxisName, PerAxis } from "../../shared/types";
import PlayControls from "../../shared/utils/playControls";
import { ViewerSettingUpdater } from "../ViewerStateProvider/types";

import NumericInput from "../shared/NumericInput";
import SmarterSlider from "../shared/SmarterSlider";

import "./styles.css";

import { ViewMode } from "../../shared/enums";
import { ViewerSettingUpdater } from "../ViewerStateProvider/types";
import { AxisName, PerAxis, activeAxisMap } from "../../shared/types";
import PlayControls from "../../shared/utils/playControls";

const AXES: AxisName[] = ["x", "y", "z"];

type SliderRowProps = {
Expand Down Expand Up @@ -92,7 +92,7 @@ const SliderRow: React.FC<SliderRowProps> = ({
</>
)}
{" / "}
{max}
{max - 1}
</span>
)}
</span>
Expand Down
Loading