mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Update NPM dependencies.
New versions of react and leaflet, along with a lot of other packages. I'm hoping that the newest react-leaflet might let use solve the carrier drag and drop issues in a less hacky way, since that's the cause of https://github.com/dcs-liberation/dcs_liberation/issues/2388.
This commit is contained in:
@@ -4,9 +4,12 @@ import AircraftLayer from "../aircraftlayer";
|
||||
import AirDefenseRangeLayer from "../airdefenserangelayer";
|
||||
import CombatLayer from "../combatlayer";
|
||||
import ControlPointsLayer from "../controlpointslayer";
|
||||
import CullingExclusionZones from "../cullingexclusionzones/CullingExclusionZones";
|
||||
import FlightPlansLayer from "../flightplanslayer";
|
||||
import FrontLinesLayer from "../frontlineslayer";
|
||||
import Iadsnetworklayer from "../iadsnetworklayer";
|
||||
import NavMeshLayer from "../navmesh/NavMeshLayer";
|
||||
import LeafletRuler from "../ruler/Ruler";
|
||||
import SupplyRoutesLayer from "../supplyrouteslayer";
|
||||
import TerrainZonesLayers from "../terrainzones/TerrainZonesLayers";
|
||||
import TgosLayer from "../tgoslayer/TgosLayer";
|
||||
@@ -17,22 +20,15 @@ import { Map } from "leaflet";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { BasemapLayer } from "react-esri-leaflet";
|
||||
import { LayersControl, MapContainer, ScaleControl } from "react-leaflet";
|
||||
import Iadsnetworklayer from "../iadsnetworklayer";
|
||||
import CullingExclusionZones from "../cullingexclusionzones/CullingExclusionZones"
|
||||
import LeafletRuler from "../ruler/Ruler";
|
||||
|
||||
export default function LiberationMap() {
|
||||
const map = useRef<Map>();
|
||||
const map = useRef<Map>(null);
|
||||
const mapCenter = useAppSelector(selectMapCenter);
|
||||
useEffect(() => {
|
||||
map.current?.setView(mapCenter, 8, { animate: true, duration: 1 });
|
||||
});
|
||||
return (
|
||||
<MapContainer
|
||||
zoom={8}
|
||||
zoomControl={false}
|
||||
whenCreated={(mapInstance) => (map.current = mapInstance)}
|
||||
>
|
||||
<MapContainer zoom={8} zoomControl={false} ref={map}>
|
||||
<ScaleControl />
|
||||
<LeafletRuler />
|
||||
<LayersControl collapsed={false}>
|
||||
|
||||
Reference in New Issue
Block a user