Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click to select Feature of Map -- Development #125

Merged
merged 4 commits into from
Mar 20, 2021
Merged

Click to select Feature of Map -- Development #125

merged 4 commits into from
Mar 20, 2021

Conversation

ababaian
Copy link
Member

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 ababaian requested a review from victorlin March 20, 2021 17:39
@ababaian
Copy link
Member Author

nvm adding select+event fixes this.

Copy link
Member

@victorlin victorlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, you did it!!! any easy way to “reset” the selections? besides using box/lasso on an empty region

@ababaian ababaian merged commit 098713a into main Mar 20, 2021
@ababaian ababaian deleted the map-select branch March 20, 2021 21:59
@ababaian
Copy link
Member Author

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

@ababaian ababaian restored the map-select branch September 27, 2021 07:23
@ababaian ababaian deleted the map-select branch October 16, 2021 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants