Skip to content

Add position to Maps add method#1156

Merged
martinRenou merged 5 commits intojupyter-widgets:masterfrom
gjmooney:add_position_to_layer
Dec 15, 2023
Merged

Add position to Maps add method#1156
martinRenou merged 5 commits intojupyter-widgets:masterfrom
gjmooney:add_position_to_layer

Conversation

@gjmooney
Copy link
Contributor

Add position parameter to Maps add method, allowing users to specify where in the layers stack they would add their new layer.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

Looks like a nice addition! Would you be able to add some ui-tests for this?

Also, I would rename position into index, what do you think?

return self.add(item)

def add(self, item):
def add(self, item, position=None):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def add(self, item, position=None):
def add(self, item, index=None):

@gjmooney
Copy link
Contributor Author

I added the UI tests, I also added the collapsed option to the LayerControl since that was easier then getting playwright to hover the mouse and take a screenshot

@martinRenou
Copy link
Member

I added the UI tests

You probably forgot to commit the files for that? Only leaflet.py changed in the PR

@gjmooney
Copy link
Contributor Author

gjmooney commented Dec 15, 2023

You probably forgot to commit the files for that? Only leaflet.py changed in the PR

lol woops

@martinRenou
Copy link
Member

update galata references

@martinRenou martinRenou marked this pull request as ready for review December 15, 2023 14:08
Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

Thanks!

@martinRenou martinRenou merged commit 43f346a into jupyter-widgets:master Dec 15, 2023
@gjmooney gjmooney deleted the add_position_to_layer branch December 18, 2023 11:19
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