done update after point delete

This commit is contained in:
muerwre 2019-02-06 12:23:19 +07:00
parent 121ec610e0
commit d0b5f3bd94
6 changed files with 13 additions and 15 deletions

View file

@ -1,6 +1,6 @@
import L from 'leaflet';
import 'leaflet-geometryutil';
import '../utils/EditablePolyline';
import '$utils/EditablePolyline';
import { simplify } from '$utils/simplify';
import { findDistance, middleCoord } from '$utils/geom';
import { CLIENT } from '$config/frontend';
@ -11,19 +11,12 @@ const polyStyle = {
weight: '6',
markerMid: 'url(#arrow)'
};
// const polyStyle = { color: '#ff3344', weight: '5' };
export class NewPoly {
constructor({
map, routerMoveStart, lockMapClicks, setTotalDist, triggerOnChange, editor,
}) {
// this.poly = L.polyline([], polyStyle);
const coordinates = [
// { lat: 54.9859, lng: 82.92154 },
// { lat: 55.0384, lng: 82.97699 },
// { lat: 55.0345, lng: 82.67699 },
// { lat: 55.0145, lng: 82.67699 },
];
const coordinates = [];
this.poly = L.Polyline.PolylineEditor(coordinates, {
...polyStyle,

View file

@ -4,7 +4,9 @@ import { CLIENT } from '$config/frontend';
import { DomMarker } from '$utils/DomMarker';
export class Router {
constructor({ map, lockMapClicks, setRouterPoints, pushPolyPoints }) {
constructor({
map, lockMapClicks, setRouterPoints, pushPolyPoints
}) {
this.waypoints = [];
this.lockMapClicks = lockMapClicks;
this.setRouterPoints = setRouterPoints;