Skip to content

Commit 2fe2551

Browse files
diabled the step control from link when the layout is cartesian and the orientation is horizontal, this was causing a display issue where the step was vevertical and not matching
1 parent 4faa00d commit 2fe2551

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/app/components/LinkControls.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export default function LinkControls({
2525
}: Props) {
2626
return (
2727
<div style={controlStyles}>
28-
<label>Layout:</label>&nbsp;
28+
<label>Layout:</label>
29+
&nbsp;
2930
<select
3031
onClick={(e) => e.stopPropagation()}
3132
onChange={(e) => setLayout(e.target.value)}
@@ -35,7 +36,8 @@ export default function LinkControls({
3536
<option value='polar'>Polar</option>
3637
</select>
3738
&nbsp;&nbsp;
38-
<label>Orientation:</label>&nbsp;
39+
<label>Orientation:</label>
40+
&nbsp;
3941
<select
4042
onClick={(e) => e.stopPropagation()}
4143
onChange={(e) => setOrientation(e.target.value)}
@@ -46,20 +48,24 @@ export default function LinkControls({
4648
<option value='horizontal'>Horizontal</option>
4749
</select>
4850
&nbsp;&nbsp;
49-
<label>Link:</label>&nbsp;
51+
<label>Link:</label>
52+
&nbsp;
5053
<select
5154
onClick={(e) => e.stopPropagation()}
5255
onChange={(e) => setLinkType(e.target.value)}
5356
value={linkType}
57+
disabled={layout === 'cartesian' && orientation === 'horizontal'}
5458
>
5559
<option value='diagonal'>Diagonal</option>
5660
<option value='step'>Step</option>
5761
<option value='line'>Line</option>
5862
</select>
63+
{/* This is the slider control for the step option */}
5964
{linkType === 'step' && layout !== 'polar' && (
6065
<>
6166
&nbsp;&nbsp;
62-
<label>Step:</label>&nbsp;
67+
<label>Step:</label>
68+
&nbsp;
6369
<input
6470
onClick={(e) => e.stopPropagation()}
6571
type='range'

0 commit comments

Comments
 (0)