Skip to content

Commit 3e4453a

Browse files
authored
Merge pull request #13 from oslabs-beta/feature/ellie
changed the default component map view from diagonal to step view, an…
2 parents 5bc2dc1 + 2c41358 commit 3e4453a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/app/components/StateRoute/AxMap/Ax.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default function AxTree(props) {
7777

7878
const [orientation, setOrientation] = useState('horizontal');
7979
const [linkType, setLinkType] = useState('diagonal');
80-
const [stepPercent, setStepPercent] = useState(0.5);
80+
const [stepPercent, setStepPercent] = useState(0.0);
8181

8282
const innerWidth: number = totalWidth - margin.left - margin.right;
8383
const innerHeight: number = totalHeight - margin.top - margin.bottom - 60;

src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export default function ComponentMap({
5858
currentSnapshot, // from 'tabs[currentTab].stateSnapshot object in 'MainContainer'
5959
}: LinkTypesProps): JSX.Element {
6060
const [orientation, setOrientation] = useState('vertical'); // We create a local state "orientation" and set it to a string 'vertical'.
61-
const [linkType, setLinkType] = useState('diagonal'); // We create a local state "linkType" and set it to a string 'diagonal'.
62-
const [stepPercent, setStepPercent] = useState(0.5); // We create a local state "stepPercent" and set it to a number '0.5'. This will be used to scale the Map component's link: Step to 50%
61+
const [linkType, setLinkType] = useState('step'); // We create a local state "linkType" and set it to a string 'step'.
62+
const [stepPercent, setStepPercent] = useState(0.0); // We create a local state "stepPercent" and set it to a number '0.0'. This will be used to scale the Map component's link: Step to 0%
6363
const [selectedNode, setSelectedNode] = useState('root'); // We create a local state "selectedNode" and set it to a string 'root'.
6464
const dispatch = useDispatch();
6565

@@ -82,7 +82,6 @@ export default function ComponentMap({
8282
The default view sets the root nodes location either in the left middle *or top middle of the browser window relative to the size of the browser.
8383
*/
8484

85-
8685
origin = { x: 0, y: 0 };
8786
if (orientation === 'vertical') {
8887
sizeWidth = innerWidth;
@@ -92,7 +91,7 @@ export default function ComponentMap({
9291
sizeWidth = innerHeight;
9392
sizeHeight = innerWidth;
9493
}
95-
//}
94+
//}
9695
const {
9796
tooltipData, // value/data that tooltip may need to render
9897
tooltipLeft, // number used for tooltip positioning

src/app/components/StateRoute/ComponentMap/LinkControls.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export default function LinkControls({
7171
onChange={(e) => setLinkType(e.target.value)}
7272
style={dropDownStyle}
7373
>
74-
<option value='diagonal'>Diagonal</option>
7574
<option value='step'>Step</option>
75+
<option value='diagonal'>Diagonal</option>
7676
<option value='line'>Line</option>
7777
</select>
7878
<label> Select:</label> {/* Controls for the select selections. */}

0 commit comments

Comments
 (0)