Skip to content

Commit

Permalink
changed arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
npretto committed Jan 5, 2019
1 parent 7977952 commit a5ae9ff
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,7 @@ class App extends Component {
<Link key={i} from={nodes.byId[l.from]} to={nodes.byId[l.to]} />
))}
</Layer>
<Layer>
{nodes.allIds
.map(id => [id, nodes.byId[id]])
.map(([i, n]) => (
<Node key={i} {...n} name={`${i}`} />
))}
</Layer>

<Layer>
{hasDonePath &&
Object.entries(pathState.cameFrom)
Expand All @@ -153,16 +147,28 @@ class App extends Component {
key={toId}
x={from.x}
y={from.y}
points={[0, 0, to.x - from.x, to.y - from.y]}
points={[
0,
0,
((to.x - from.x) * 2) / 3,
((to.y - from.y) * 2) / 3
]}
pointerLength={20}
pointerWidth={20}
fill={"black"}
stroke={"black"}
fill={"gray"}
stroke={"gray"}
strokeWidth={4}
/>
)
})}
</Layer>
<Layer>
{nodes.allIds
.map(id => [id, nodes.byId[id]])
.map(([i, n]) => (
<Node key={i} {...n} name={`${i}`} />
))}
</Layer>
</Stage>
</div>
)
Expand Down

0 comments on commit a5ae9ff

Please sign in to comment.