Skip to content

Commit 356b249

Browse files
committed
stored link controls and ax legend button within a div labeled axControls
1 parent dac1e22 commit 356b249

File tree

1 file changed

+14
-18
lines changed
  • src/app/components/StateRoute/AxMap

1 file changed

+14
-18
lines changed

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

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -284,39 +284,35 @@ export default function AxTree(props) {
284284

285285
return totalWidth < 10 ? null : (
286286
<div>
287-
<LinkControls
288-
layout={layout}
289-
orientation={orientation}
290-
linkType={linkType}
291-
stepPercent={stepPercent}
292-
setLayout={setLayout}
293-
setOrientation={setOrientation}
294-
setLinkType={setLinkType}
295-
setStepPercent={setStepPercent}
296-
/>
287+
<div id='axControls'>
288+
<LinkControls
289+
layout={layout}
290+
orientation={orientation}
291+
linkType={linkType}
292+
stepPercent={stepPercent}
293+
setLayout={setLayout}
294+
setOrientation={setOrientation}
295+
setLinkType={setLinkType}
296+
setStepPercent={setStepPercent}
297+
/>
297298

298299
<button id='axLegendButton' onClick={() => dispatch(renderAxLegend())}>
299300
Generate Ax Tree Legend
300301
</button>
302+
</div>
301303

302304
{/* svg references purple background */}
303-
<svg ref={containerRef} width={totalWidth} height={totalHeight + 0}>
305+
<svg ref={containerRef} width={totalWidth + 0.2*totalWidth} height={totalHeight}>
304306
<LinearGradient id='root-gradient' from='#488689' to='#3c6e71' />
305307
<LinearGradient id='parent-gradient' from='#488689' to='#3c6e71' />
306-
<rect
307-
className='componentMapContainer'
308-
width={sizeWidth / aspect}
309-
height={sizeHeight / aspect + 0}
310-
rx={14}
311-
/>
312308
<Group transform={`scale(${aspect})`} top={margin.top} left={margin.left}>
313309
<Tree
314310
root={hierarchy(nodeAxArr[0], (d) => (d.isExpanded ? null : d.children))}
315311
size={[sizeWidth / aspect, sizeHeight / aspect]}
316312
separation={(a, b) => (a.parent === b.parent ? 0.5 : 0.5) / a.depth}
317313
>
318314
{(tree) => (
319-
<Group top={origin.y + 35} left={origin.x + 50 / aspect}>
315+
<Group top={origin.y + 35} left={origin.x + 110}>
320316
{tree.links().map((link, i) => (
321317
<LinkComponent
322318
key={i}

0 commit comments

Comments
 (0)