MapMode styling; MapPrint check for mode
This commit is contained in:
@ -32,7 +32,10 @@ const MapMode = ({
|
|||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
gap: '0.25rem',
|
gap: '0.25rem',
|
||||||
padding: '0.25rem'
|
padding: '0.25rem',
|
||||||
|
zIndex: 1,
|
||||||
|
background: 'var(--colorNeutralBackground1)',
|
||||||
|
borderRadius: 'var(--borderRadiusMedium)'
|
||||||
}}>
|
}}>
|
||||||
<Button
|
<Button
|
||||||
appearance={mode === 'view' ? 'primary' : 'subtle'}
|
appearance={mode === 'view' ? 'primary' : 'subtle'}
|
||||||
|
@ -24,6 +24,7 @@ const MapPrint = ({
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
map,
|
map,
|
||||||
|
mode,
|
||||||
previousView, printArea, printSource, printAreaDraw, printScale, printScaleLine,
|
previousView, printArea, printSource, printAreaDraw, printScale, printScaleLine,
|
||||||
} = useMapStore().id[id]
|
} = useMapStore().id[id]
|
||||||
|
|
||||||
@ -151,7 +152,7 @@ const MapPrint = ({
|
|||||||
}, [printArea])
|
}, [printArea])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!opened) {
|
if (!opened && mode === 'print') {
|
||||||
clearPrintArea(id)
|
clearPrintArea(id)
|
||||||
map?.setTarget(mapElement.current as HTMLDivElement)
|
map?.setTarget(mapElement.current as HTMLDivElement)
|
||||||
map?.addInteraction(printAreaDraw)
|
map?.addInteraction(printAreaDraw)
|
||||||
|
Reference in New Issue
Block a user