-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from jannomeister/develop
release: v0.3.0
- Loading branch information
Showing
12 changed files
with
316 additions
and
389 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
table { | ||
width: 100%; | ||
border-spacing: 0; | ||
outline: 1px solid grey; | ||
outline: 1px solid #364F6B; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,34 @@ | ||
import React from 'react'; | ||
import Node from '../Node/Node'; | ||
|
||
import Grid from '@material-ui/core/Grid'; | ||
|
||
import './Board.css'; | ||
|
||
const Board = ({ nodes, onClick }) => { | ||
return ( | ||
<Grid item xs={12}> | ||
<table cellSpacing="0" cellPadding="0"> | ||
<tbody> | ||
{nodes.map((row, rowIdx) => ( | ||
<tr key={rowIdx}> | ||
{row.map(({isStart, isFinish, isWall}, nodeIdx) => ( | ||
<Node | ||
key={nodeIdx} | ||
row={rowIdx} | ||
col={nodeIdx} | ||
isStart={isStart} | ||
isFinish={isFinish} | ||
isWall={isWall} | ||
onClick={onClick} | ||
// onClick={(row, col) => onClick(row, col)} | ||
// onMouseDown={(row, col) => onMouseDown(row, col)} | ||
// onMouseEnter={(row, col) => onMouseEnter(row, col)} | ||
// onMouseUp={onMouseUp} | ||
/> | ||
))} | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</Grid> | ||
) | ||
} | ||
const Board = ({ nodes, onClick }) => ( | ||
<div style={{ padding: 10 }}> | ||
<table cellSpacing="0" cellPadding="0"> | ||
<tbody> | ||
{nodes.map((row, rowIdx) => ( | ||
<tr key={rowIdx}> | ||
{row.map(({isStart, isFinish, isWall}, nodeIdx) => ( | ||
<Node | ||
key={nodeIdx} | ||
row={rowIdx} | ||
col={nodeIdx} | ||
isStart={isStart} | ||
isFinish={isFinish} | ||
isWall={isWall} | ||
onClick={onClick} | ||
// onClick={(row, col) => onClick(row, col)} | ||
// onMouseDown={(row, col) => onMouseDown(row, col)} | ||
// onMouseEnter={(row, col) => onMouseEnter(row, col)} | ||
// onMouseUp={onMouseUp} | ||
/> | ||
))} | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
) | ||
|
||
export default Board; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 9 additions & 11 deletions
20
src/PathFindingVisualizer/Control/DiagonalOption/DiagonalOption.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import Container from 'react-bootstrap/Container'; | ||
import Col from 'react-bootstrap/Col'; | ||
import Row from 'react-bootstrap/Row'; | ||
|
||
import './Legend.css'; | ||
|
||
const Legend = () => ( | ||
<Container style={{ marginBottom: 10, borderBottom: '1px solid grey', paddingBottom: 10 }}> | ||
<Row style={{ marginBottom: 5 }}> | ||
<Col xs={6}> | ||
<img src={require("../../../assets/start.png")} style={{ marginRight: 2 }} alt="" width={20} height={20} /> | ||
<span>Starting Node</span> | ||
</Col> | ||
<Col xs={6}> | ||
<img src={require("../../../assets/finish.png")} style={{ marginRight: 2 }} alt="" width={20} height={20} /> | ||
<span>Finish Node</span> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col xs={6}> | ||
<div style={{ width: 20, height: 20, marginRight: 3, backgroundColor: '#364F6B', display: 'inline-block', verticalAlign: 'sub' }}></div> | ||
<span>Wall Node</span> | ||
</Col> | ||
<Col xs={6}> | ||
<div style={{ width: 19, height: 19, marginRight: 3, outline: '1px solid #3FC1C9', display: 'inline-block', verticalAlign: 'sub' }}></div> | ||
<span>Path Node</span> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col xs={6}> | ||
<div style={{ width: 20, height: 20, marginRight: 3, backgroundColor: 'rgba(0, 190, 218, 0.75)', display: 'inline-block', verticalAlign: 'sub' }}></div> | ||
<span>Visited Node</span> | ||
</Col> | ||
<Col xs={6}> | ||
<div style={{ width: 20, height: 20, marginRight: 3, backgroundColor: '#FC5185', display: 'inline-block', verticalAlign: 'sub' }}></div> | ||
<span>Shortest Path</span> | ||
</Col> | ||
</Row> | ||
</Container> | ||
) | ||
|
||
export default Legend |
Oops, something went wrong.