MapMode styling; MapPrint check for mode
This commit is contained in:
@ -24,6 +24,7 @@ const MapPrint = ({
|
||||
|
||||
const {
|
||||
map,
|
||||
mode,
|
||||
previousView, printArea, printSource, printAreaDraw, printScale, printScaleLine,
|
||||
} = useMapStore().id[id]
|
||||
|
||||
@ -151,7 +152,7 @@ const MapPrint = ({
|
||||
}, [printArea])
|
||||
|
||||
useEffect(() => {
|
||||
if (!opened) {
|
||||
if (!opened && mode === 'print') {
|
||||
clearPrintArea(id)
|
||||
map?.setTarget(mapElement.current as HTMLDivElement)
|
||||
map?.addInteraction(printAreaDraw)
|
||||
|
||||
Reference in New Issue
Block a user