Polish GeoIntel workbench and harden Tower deploy
This commit is contained in:
@@ -11,6 +11,9 @@ import './styles/premium.css'
|
||||
import './styles/atlas-workbench.css'
|
||||
import './styles/atlas-premium-v2.css'
|
||||
import './styles/professionalization.css'
|
||||
// Laatst geladen en leidend: het geconsolideerde designsysteem.
|
||||
// Zie de kop van geointel-system.css voor de reden.
|
||||
import './styles/geointel-system.css'
|
||||
import { LandingPage } from './components/auth/LandingPage'
|
||||
import { ChangeDetectionPanel } from './components/analysis/ChangeDetectionPanel'
|
||||
import { GeoAssistantPanel } from './components/assistant/GeoAssistantPanel'
|
||||
|
||||
@@ -176,6 +176,28 @@ function GeoMap({
|
||||
const dataRef = useRef<GeoJSON.FeatureCollection | null>(data)
|
||||
const fitDataOnChangeRef = useRef(fitDataOnChange)
|
||||
const imageOverlayIdsRef = useRef<string[]>([])
|
||||
// Onthoudt op welk kader al is ingezoomd. De fit-effecten draaien ook wanneer
|
||||
// alleen `data` verandert; zonder deze bewaking sprong de kaart na elke
|
||||
// analyse terug naar het volledige werkgebied en verloor de gebruiker zijn
|
||||
// ingezoomde beeld direct na het tekenen van een selectie.
|
||||
const lastFittedBoundsRef = useRef<string | null>(null)
|
||||
|
||||
// Zoomt alleen wanneer het kader echt anders is dan waarop we al pasten.
|
||||
// Herhaalde aanroepen met dezelfde grenzen laten het beeld met rust.
|
||||
const fitBoundsIfChanged = (
|
||||
map: maplibregl.Map,
|
||||
bounds: maplibregl.LngLatBoundsLike | null,
|
||||
) => {
|
||||
if (!bounds) {
|
||||
return
|
||||
}
|
||||
const key = JSON.stringify(bounds)
|
||||
if (lastFittedBoundsRef.current === key) {
|
||||
return
|
||||
}
|
||||
lastFittedBoundsRef.current = key
|
||||
map.fitBounds(bounds, { padding: 40, duration: 0 })
|
||||
}
|
||||
const [mapStyleReady, setMapStyleReady] = useState(false)
|
||||
|
||||
areaDataRef.current = areaData
|
||||
@@ -230,10 +252,9 @@ function GeoMap({
|
||||
map.resize()
|
||||
const fitCollection = areaDataRef.current
|
||||
?? (fitDataOnChangeRef.current ? dataRef.current : null)
|
||||
const bounds = fitCollection ? collectCoordinates(fitCollection) : null
|
||||
if (bounds) {
|
||||
map.fitBounds(bounds, { padding: 40, duration: 0 })
|
||||
}
|
||||
// Bij het aanpassen van de venstergrootte het beeld behouden in plaats
|
||||
// van terugspringen naar het volledige werkgebied.
|
||||
fitBoundsIfChanged(map, fitCollection ? collectCoordinates(fitCollection) : null)
|
||||
})
|
||||
resizeObserver.observe(containerRef.current)
|
||||
map.addControl(new maplibregl.NavigationControl(), 'top-right')
|
||||
@@ -425,10 +446,7 @@ function GeoMap({
|
||||
if (data && fitDataOnChange && !areaData) {
|
||||
const collection = data
|
||||
if (collection.type === 'FeatureCollection' && collection.features.length > 0) {
|
||||
const bounds = collectCoordinates(collection)
|
||||
if (bounds) {
|
||||
map.fitBounds(bounds, { padding: 40, duration: 0 })
|
||||
}
|
||||
fitBoundsIfChanged(map, collectCoordinates(collection))
|
||||
}
|
||||
}
|
||||
}, [areaData, data, dataFillColor, dataLineColor, fitDataOnChange, mapStyleReady])
|
||||
@@ -494,12 +512,13 @@ function GeoMap({
|
||||
)
|
||||
}
|
||||
|
||||
// Dit effect draait ook wanneer alleen `data` verandert, bijvoorbeeld zodra
|
||||
// een analyse resultaten oplevert. Ongewaakt zoomde de kaart dan terug naar
|
||||
// het volledige werkgebied, meteen nadat de gebruiker een rechthoek had
|
||||
// getekend. De bewaking laat het beeld staan zolang het gebied gelijk blijft.
|
||||
const activeCollection = areaData ?? (fitDataOnChange ? data : null)
|
||||
if (activeCollection) {
|
||||
const bounds = collectCoordinates(activeCollection)
|
||||
if (bounds) {
|
||||
map.fitBounds(bounds, { padding: 40, duration: 0 })
|
||||
}
|
||||
fitBoundsIfChanged(map, collectCoordinates(activeCollection))
|
||||
}
|
||||
}, [areaData, data, fitDataOnChange, mapStyleReady])
|
||||
|
||||
|
||||
@@ -98,7 +98,9 @@ export function LandingPage({
|
||||
setMenuOpen(false)
|
||||
setPendingAction('guest')
|
||||
setAuthError(null)
|
||||
accessPanelRef.current?.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
if (typeof accessPanelRef.current?.scrollIntoView === 'function') {
|
||||
accessPanelRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
}
|
||||
try {
|
||||
const session = await loginAsGuest()
|
||||
onAuthenticated(session)
|
||||
@@ -111,7 +113,9 @@ export function LandingPage({
|
||||
|
||||
const focusLogin = () => {
|
||||
setMenuOpen(false)
|
||||
accessPanelRef.current?.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
if (typeof accessPanelRef.current?.scrollIntoView === 'function') {
|
||||
accessPanelRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
}
|
||||
window.requestAnimationFrame(() => usernameRef.current?.focus())
|
||||
}
|
||||
|
||||
@@ -124,7 +128,6 @@ export function LandingPage({
|
||||
<GeoIntelMark className="landing-brand-mark" />
|
||||
<span className="landing-brand-copy">
|
||||
<strong>GeoIntel</strong>
|
||||
<small>Atlas Workbench</small>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -374,7 +377,7 @@ export function LandingPage({
|
||||
<footer className="landing-footer">
|
||||
<div className="landing-footer-brand">
|
||||
<GeoIntelMark className="landing-footer-mark" />
|
||||
<div><strong>GeoIntel Atlas Workbench</strong><p>Operationele GIS-analyse voor België en de Belgische Noordzee.</p></div>
|
||||
<div><strong>GeoIntel</strong><p>Operationele GIS-analyse voor België en de Belgische Noordzee.</p></div>
|
||||
</div>
|
||||
<div className="landing-footer-ownership">
|
||||
<ItWorxSignature />
|
||||
|
||||
@@ -54,7 +54,6 @@ export function WorkbenchNavigation({
|
||||
<GeoIntelMark className="brand-mark" />
|
||||
<span className="sidebar-brand-copy">
|
||||
<strong>GeoIntel</strong>
|
||||
<small>Atlas Workbench</small>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user