File tree Expand file tree Collapse file tree
packages/plugins/src/plugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -636,8 +636,8 @@ function refresh(): void {
636636 applyStyle ( ) ;
637637 ( map . getSource ( SOURCE_ID ) as GeoJSONSource | undefined ) ?. setData ( currentGrid ) ;
638638 updateSelectedSource ( ) ;
639- // Pan/zoom only changes the cell count status — rebuild the whole panel and
640- // the open color picker / focused inputs are destroyed mid-gesture .
639+ // Pan/zoom only updates the status line (and auto-resolution readout) —
640+ // rebuilding the whole panel would destroy open color pickers / focused inputs.
641641 updatePanelStatus ( ) ;
642642}
643643
@@ -1042,7 +1042,15 @@ export const maplibreDggalPlugin: GeoLibrePlugin = {
10421042 const generation = ( activationGeneration += 1 ) ;
10431043 // Await WASM before mutating map/panel state so a deactivate during the
10441044 // load cannot race a late attach (leaked listeners / panels / layers).
1045- const engine = await loadDggal ( ) ;
1045+ let engine : DggalEngine ;
1046+ try {
1047+ engine = await loadDggal ( ) ;
1048+ } catch ( error ) {
1049+ if ( generation === activationGeneration ) {
1050+ currentError = error instanceof Error ? error . message : String ( error ) ;
1051+ }
1052+ return false ;
1053+ }
10461054 if ( generation !== activationGeneration ) return false ;
10471055 dggal = engine ;
10481056 map = activeMap ;
Original file line number Diff line number Diff line change @@ -860,8 +860,8 @@ function refresh(): void {
860860 applyStyle ( ) ;
861861 ( map . getSource ( SOURCE_ID ) as GeoJSONSource | undefined ) ?. setData ( currentGrid ) ;
862862 updateSelectedSource ( ) ;
863- // Pan/zoom only changes the cell count status — rebuild the whole panel and
864- // the open color picker / focused inputs are destroyed mid-gesture .
863+ // Pan/zoom only updates the status line (and auto-resolution readout) —
864+ // rebuilding the whole panel would destroy open color pickers / focused inputs.
865865 updatePanelStatus ( ) ;
866866}
867867
@@ -1267,7 +1267,15 @@ export const maplibreDggridPlugin: GeoLibrePlugin = {
12671267 const generation = ( activationGeneration += 1 ) ;
12681268 // Await WASM before mutating map/panel state so a deactivate during the
12691269 // load cannot race a late attach (leaked listeners / panels / layers).
1270- const engine = await loadDggrid ( ) ;
1270+ let engine : DggridEngine ;
1271+ try {
1272+ engine = await loadDggrid ( ) ;
1273+ } catch ( error ) {
1274+ if ( generation === activationGeneration ) {
1275+ currentError = error instanceof Error ? error . message : String ( error ) ;
1276+ }
1277+ return false ;
1278+ }
12711279 if ( generation !== activationGeneration ) return false ;
12721280 dggs = engine ;
12731281 map = activeMap ;
You can’t perform that action at this time.
0 commit comments