serratus-bio / serratus.io

Front-end code for Serratus project website
https://serratus.io
GNU Affero General Public License v3.0
11 stars 11 forks source link

Click to select Feature of Map -- Development #125

Closed ababaian closed 3 years ago

ababaian commented 3 years ago

Current behaviour is that clicking has no effect on the map and double-click resets the map to a full world view. see: www.serratus.io/geo


In plotly there is a layout setting for all graphs and one of the settings is (clickmode](https://plotly.com/python/reference/layout/#layout-clickmode). This defaults to event setting but I guess we have no event triggers to make use of this.

I've chnaged clickmode to select which allows me to set a given point as selected (the same as when box-select is used on multiple points). To confirm this I've changed the color of selected points to "purple" (feature we should include).

The problem currently is that click-select is not loading the table-results of SelectionInfo (table below the graph). I can't figure out how the behaviour for loading the table is being triggered to reset and then attach it to clickmode.

Current build: https://map-select.d1w6d75be7tofa.amplifyapp.com/

ababaian commented 3 years ago

nvm adding select+event fixes this.

ababaian commented 3 years ago

No I've been using box lasso, but you can click on any one point (no shift) and it will reset everything then unclick that point