MapMode styling; MapPrint check for mode
This commit is contained in:
@ -32,7 +32,10 @@ const MapMode = ({
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
gap: '0.25rem',
|
||||
padding: '0.25rem'
|
||||
padding: '0.25rem',
|
||||
zIndex: 1,
|
||||
background: 'var(--colorNeutralBackground1)',
|
||||
borderRadius: 'var(--borderRadiusMedium)'
|
||||
}}>
|
||||
<Button
|
||||
appearance={mode === 'view' ? 'primary' : 'subtle'}
|
||||
|
@ -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