mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
router now continues after confirmation
This commit is contained in:
parent
acc7cf6a22
commit
fd01e69075
3 changed files with 16 additions and 14 deletions
|
@ -38,9 +38,6 @@ export class EditorPanel extends React.PureComponent {
|
||||||
<span>РЕДАКТОР</span>
|
<span>РЕДАКТОР</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="panel right">
|
|
||||||
<div className="control-dist">
|
<div className="control-dist">
|
||||||
{(totalDistance > 0)
|
{(totalDistance > 0)
|
||||||
?
|
?
|
||||||
|
@ -54,6 +51,9 @@ export class EditorPanel extends React.PureComponent {
|
||||||
: <div>Начните рисовать --></div>
|
: <div>Начните рисовать --></div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="panel right">
|
||||||
<div className="control-bar">
|
<div className="control-bar">
|
||||||
<button
|
<button
|
||||||
className={classnames({ active: mode === MODES.ROUTER })}
|
className={classnames({ active: mode === MODES.ROUTER })}
|
||||||
|
|
|
@ -124,9 +124,11 @@ export class Router {
|
||||||
const [route] = this.router._routes;
|
const [route] = this.router._routes;
|
||||||
if (!route) return;
|
if (!route) return;
|
||||||
|
|
||||||
const { coordinates, summary: { totalDistance } } = route;
|
const { coordinates } = route;
|
||||||
this.pushPolyPoints(coordinates);
|
this.pushPolyPoints(coordinates);
|
||||||
this.router.setWaypoints([]);
|
const waypoints = this.router.getWaypoints().filter(({ latLng }) => !!latLng);
|
||||||
this.changeMode(MODES.POLY);
|
this.router.setWaypoints(waypoints[waypoints.length-1]);
|
||||||
|
|
||||||
|
// this.changeMode(MODES.POLY);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 3px 0 0 3px;
|
border-radius: 0 3px 3px 0;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue