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

Add position to Maps add method #1156

Merged
merged 5 commits into from
Dec 15, 2023

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?

@@ -2676,13 +2676,15 @@ def __isub__(self, item):
def __add__(self, item):
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
1 check was pending
@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