MapMode styling; MapPrint check for mode

This commit is contained in:
2025-10-01 12:09:11 +09:00
parent bdab63f1bb
commit 5a7a70aa6c
2 changed files with 6 additions and 2 deletions

View File

@ -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'}

View File

@ -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)