diff --git a/src/components/dialogs/GpxDialog.tsx b/src/components/dialogs/GpxDialog.tsx index 41cb3db..3b080db 100644 --- a/src/components/dialogs/GpxDialog.tsx +++ b/src/components/dialogs/GpxDialog.tsx @@ -111,6 +111,20 @@ const GpxDialogUnconnected: FC = ({ return (
+ {false && ( +
+
Маршрут уже нанесен. Что делаем?
+ +
+
Соединить
+ +
Переписать
+ +
Отмена
+
+
+ )} +
Треки
diff --git a/src/components/gpx/GpxDialogRow.tsx b/src/components/gpx/GpxDialogRow.tsx index cbfc432..73cd0ce 100644 --- a/src/components/gpx/GpxDialogRow.tsx +++ b/src/components/gpx/GpxDialogRow.tsx @@ -25,6 +25,7 @@ const GpxDialogRow: FC = ({ item, index, enabled, onRouteToggle, onFocus
+
onRouteDrop(index)}>
onRouteDrop(index)}>
onRouteToggle(index)}/>
diff --git a/src/map/GpxPolyline/index.tsx b/src/map/GpxPolyline/index.tsx index eb8d696..b78bdf3 100644 --- a/src/map/GpxPolyline/index.tsx +++ b/src/map/GpxPolyline/index.tsx @@ -15,7 +15,7 @@ const GpxPolyline: FC = ({ latlngs, color }) => { color, stroke: true, opacity: 1, - weight: 7, + weight: 7, // dashArray: [12,12], }).addTo(MainMap); setLayer(item); diff --git a/src/sprites/icon.svg b/src/sprites/icon.svg index 21ac47e..514ad8d 100644 --- a/src/sprites/icon.svg +++ b/src/sprites/icon.svg @@ -402,7 +402,24 @@ + + + + + + + + + + + + + + + + + diff --git a/src/sprites/icons_draft.svg b/src/sprites/icons_draft.svg index 5f315c5..db16265 100644 --- a/src/sprites/icons_draft.svg +++ b/src/sprites/icons_draft.svg @@ -48,11 +48,11 @@ borderopacity="1.0" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:zoom="5.6568542" - inkscape:cx="7.5044641" - inkscape:cy="20.369143" + inkscape:zoom="1" + inkscape:cx="47.453778" + inkscape:cy="21.541153" inkscape:document-units="px" - inkscape:current-layer="svg8" + inkscape:current-layer="g4843" showgrid="false" inkscape:window-width="1920" inkscape:window-height="1015" @@ -61,7 +61,11 @@ inkscape:window-maximized="1" units="px" inkscape:showpageshadow="false" - inkscape:snap-global="true" /> + inkscape:snap-global="false"> + + @@ -662,17 +666,6 @@ transform="matrix(2,0,0,2,128,98.814754)" id="path8777" /> - - - @@ -742,29 +735,152 @@ d="m -398.03987,8.959327 c 0.96726,6.15e-5 2.83931,0.419056 2.83931,0.419056 l 0.81565,-1.6970847 2.25681,4.8545537 -5.09396,1.335474 0.77693,-1.937748 c 0,0 -1.10109,-0.113536 -1.59474,-0.114876 -3.85069,4.73e-4 -6.97217,3.12196 -6.97265,6.972656 10e-4,1.212906 0.31917,2.404467 0.92188,3.457031 l -2.07031,2.070313 c -1.11178,-1.629145 -1.70791,-3.554996 -1.71094,-5.527344 2.9e-4,-5.429961 4.40206,-9.8317428 9.83202,-9.832031 z" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.13512897;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + id="g4695" + transform="translate(-448)"> - + style="fill:#1a1a1a" + id="g6599-3"> + + + + transform="rotate(-180,16.23592,15.944757)" + id="g1083"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/styles/gpx.less b/src/styles/gpx.less index f46c62c..82b9f2c 100644 --- a/src/styles/gpx.less +++ b/src/styles/gpx.less @@ -84,3 +84,16 @@ justify-content: center; } } + +.gpx-confirm { + position: absolute; + bottom: 5%; + left: 5%; + z-index: 5; + width: 90%; + padding: 10px; + border-radius: @panel_radius; + box-sizing: border-box; + background: lighten(@bar_background, 10%); + box-shadow: rgba(0,0,0,0.5) 0 5px 5px 10px; +} \ No newline at end of file diff --git a/src/styles/map.less b/src/styles/map.less index 5ba3646..08a1cb3 100644 --- a/src/styles/map.less +++ b/src/styles/map.less @@ -150,6 +150,14 @@ } } +.start-marker { + svg { + position: absolute; + left: -4px; + top: -4px; + } +} + .end-marker { .leaflet-km-dist { left: auto; diff --git a/src/utils/map/InteractivePoly.ts b/src/utils/map/InteractivePoly.ts index 9e83fbb..de5b064 100644 --- a/src/utils/map/InteractivePoly.ts +++ b/src/utils/map/InteractivePoly.ts @@ -140,7 +140,7 @@ class InteractivePoly extends Polyline { }; hideAllMarkers = (): void => { - if (!this._map.hasLayer(this.markerLayer)) return; + if (!this._map || !this._map.hasLayer(this.markerLayer)) return; this._map.removeLayer(this.markerLayer); this.fire('allvertexhide'); diff --git a/src/utils/marks.ts b/src/utils/marks.ts index 7c57225..161ee6c 100644 --- a/src/utils/marks.ts +++ b/src/utils/marks.ts @@ -6,6 +6,7 @@ import classNames from 'classnames'; const arrow_image = require('~/sprites/arrow.svg'); interface KmMarksOptions { + showStartMarker: boolean; showMiddleMarkers: boolean; showEndMarker: boolean; showArrows: boolean; @@ -17,6 +18,7 @@ class KmMarksLayer extends LayerGroup { super(); this.options = { + showStartMarker: true, showMiddleMarkers: true, showEndMarker: true, showArrows: true, @@ -120,6 +122,25 @@ class KmMarksLayer extends LayerGroup { zIndexOffset: -100, }); + createStartMarker = (latlng: LatLngLiteral): Marker => + marker(latlng, { + draggable: false, + interactive: false, + icon: divIcon({ + html: ` + + + + + + `, + className: classNames('leaflet-km-marker start-marker'), + iconSize: [20, 20], + iconAnchor: [6, 6], + }), + zIndexOffset: -100, + }); + drawEndMarker = (latlngs: LatLngLiteral[]): void => { this.endMarker.clearLayers(); @@ -132,6 +153,9 @@ class KmMarksLayer extends LayerGroup { ); this.endMarker.addLayer(this.createEndMarker(next, angle, this.distance)); + if (latlngs && latlngs.length) { + this.endMarker.addLayer(this.createStartMarker(latlngs[0])); + } }; options: KmMarksOptions;