cleanup
This commit is contained in:
@ -148,8 +148,6 @@ export default function FolderViewer() {
|
|||||||
|
|
||||||
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
if (e.target.files) {
|
if (e.target.files) {
|
||||||
// do what Mantine's onChange did
|
|
||||||
console.log("Selected files:", Array.from(e.target.files));
|
|
||||||
handleFileInput(Array.from(e.target.files))
|
handleFileInput(Array.from(e.target.files))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -208,6 +208,8 @@ const MapComponent = ({
|
|||||||
//if (snap.current) map?.current?.removeInteraction(snap.current)
|
//if (snap.current) map?.current?.removeInteraction(snap.current)
|
||||||
addInteractions(id)
|
addInteractions(id)
|
||||||
} else {
|
} else {
|
||||||
|
//map?.getInteractions().clear()
|
||||||
|
//addInteractions(id)
|
||||||
if (translate) map?.removeInteraction(translate)
|
if (translate) map?.removeInteraction(translate)
|
||||||
if (draw) map?.removeInteraction(draw)
|
if (draw) map?.removeInteraction(draw)
|
||||||
if (snap) map?.removeInteraction(snap)
|
if (snap) map?.removeInteraction(snap)
|
||||||
@ -217,6 +219,7 @@ const MapComponent = ({
|
|||||||
|
|
||||||
// Satellite tiles setting
|
// Satellite tiles setting
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log("Setting satLayer", satMapsProvider)
|
||||||
if (satLayer) {
|
if (satLayer) {
|
||||||
if (satMapsProvider === 'google') {
|
if (satMapsProvider === 'google') {
|
||||||
satLayer.setSource(googleMapsSatelliteSource)
|
satLayer.setSource(googleMapsSatelliteSource)
|
||||||
|
|||||||
Reference in New Issue
Block a user