Skip to content

Commit 02e0b21

Browse files
committed
Removed the midpoint marker for when logScale is true
1 parent 589c91f commit 02e0b21

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

src/ui/widgets/Tank/tankWithScale.tsx

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,33 @@ export const TankWithScale = (props: {
5656
top: "10%"
5757
}}
5858
/>
59-
<span
60-
className={classes.ScaleMarker}
61-
style={{
62-
top: "50%",
63-
color: foregroundColor.toString(),
64-
writingMode: "vertical-lr",
65-
scale: "-1",
66-
transform: "translateY(50%)",
67-
...font?.css()
68-
}}
69-
>
70-
{logScale
71-
? Number((max - min) / 2).toExponential(0)
72-
: Number((max - min) / 2).toFixed(1)}
73-
</span>
74-
<span
75-
className={classes.ScaleTick}
76-
style={{
77-
top: "50%"
78-
}}
79-
/>
59+
{!logScale ? (
60+
<span
61+
className={classes.ScaleMarker}
62+
style={{
63+
top: "50%",
64+
color: foregroundColor.toString(),
65+
writingMode: "vertical-lr",
66+
scale: "-1",
67+
transform: "translateY(50%)",
68+
...font?.css()
69+
}}
70+
>
71+
{logScale ? "" : Number((max - min) / 2).toFixed(1)}
72+
</span>
73+
) : (
74+
<></>
75+
)}
76+
{!logScale ? (
77+
<span
78+
className={classes.ScaleTick}
79+
style={{
80+
top: "50%"
81+
}}
82+
/>
83+
) : (
84+
<></>
85+
)}
8086
<span
8187
className={classes.ScaleMarker}
8288
style={{

0 commit comments

Comments
 (0)