Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 7d477849

Přidáno uživatelem Václav Honzík před asi 2 roky(ů)

reidxing + drag jump fix

re #9741

Zobrazit rozdíly:

frontend/src/features/TrackingTool/Map/MapPath.tsx
3 3
import { RootState } from '../../redux/store'
4 4
import { PathVariant, MapPoint, isMapPointDisplayable } from './pathUtils'
5 5
import TextPath from 'react-leaflet-textpath'
6
import { setPrimaryIdx, updateMapMarker, updateMapMarkerWithId } from '../trackingToolSlice'
6
import {
7
    setPrimaryIdx,
8
    updateMapMarker,
9
    updateMapMarkerWithId,
10
} from '../trackingToolSlice'
7 11
import MapMarker from './MapMarker'
8 12
import { LatLngTuple } from 'leaflet'
9 13
import { Popup, Tooltip } from 'react-leaflet'
......
75 79
            edges.push(
76 80
                <TextPath
77 81
                    // Somehow this refuses to work so let it rerender everything ...
78
                    key={`${activeMapPoints[i].id}-${activeMapPoints[i + 1].id}`}
82
                    key={`${activeMapPoints[i].id}-${
83
                        activeMapPoints[i + 1].id
84
                    }`}
79 85
                    positions={[
80 86
                        [start.latitude, start.longitude],
81 87
                        [end.latitude, end.longitude],
......
153 159
                                                onChange={() => {
154 160
                                                    dispatch(
155 161
                                                        updateMapMarker({
156
                                                            item: {
157
                                                                ...item,
158
                                                                active: !item.active,
159
                                                            },
162
                                                            ...item,
163
                                                            active: !item.active,
160 164
                                                        })
161 165
                                                    )
162 166
                                                }}

Také k dispozici: Unified diff