BiologicalRecordsCentre / bsbi-atlas-drupal8

0 stars 0 forks source link

Zoomable map not being cleared when no data available #3

Closed burkmarr closed 1 year ago

burkmarr commented 1 year ago

From an email from Andy Musgrove:

I selected Dryas octopetala, then went to look at the zoomable tetrad map. I then returned to the overview map. I then selected Diapensia lapponica [...]. I then wondered if you mapped it at tetrad level or not. So I clicked the Zoomable button. It tells me that you're not mapping it for sensitivity reasons, but the prior tetrad map for Dryas returns (as screenshot below). You really want that to be an empty map instead.

burkmarr commented 1 year ago

image

burkmarr commented 1 year ago

Took a while to track this down but turned out to be because when no data available for display in zoom map, then the div in which the pane are displayed is hidden. But when this is done while whole zoom map is hidden (as was the case with the workflow outlined by Andy above), the hiding of the div didn't work. I switched to a much more D3 idiomatic way of handling the no data situation. So the update that fixed this was actually in the BRC Atlas JS library. The new version of that library was added to this repo. This is now deployed on the live site.