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

Allow setting Map.dragging #1001

Merged
merged 1 commit into from Jun 22, 2022

Conversation

davidbrochart
Copy link
Member

Fixes #977

It works, but when dragging is set the second time, we get this error in the console:

272.eb0d340….js:1 Error setting state: Cannot convert undefined or null to object
t.set_state	@	272.eb0d340….js:1
(anonymous)	@	272.eb0d340….js:1
Promise.then (async)		
t._handle_comm_msg	@	272.eb0d340….js:1
_handleCommMsg	@	jlab_core.fc632a0f38…32a0f38747f007842:2
_handleMessage	@	jlab_core.fc632a0f38…32a0f38747f007842:2
await in _handleMessage (async)		
(anonymous)	@	jlab_core.fc632a0f38…32a0f38747f007842:2
Promise.then (async)		
_onWSMessage	@	jlab_core.fc632a0f38…32a0f38747f007842:2

Looks like a low-level widget comm message error. Any idea @martinRenou ?

@martinRenou
Copy link
Member

Do we really need to rerender the entire map just because dragging has been changed? You could probably use map.dragging.enable(); and map.dragging.disable(); instead?

@davidbrochart
Copy link
Member Author

Indeed!

@davidbrochart davidbrochart merged commit a19fbca into jupyter-widgets:master Jun 22, 2022
@davidbrochart davidbrochart deleted the dragging branch June 22, 2022 08:58
@davidbrochart davidbrochart changed the title Rerender map when changing Map.dragging Allow setting Map.dragging Jun 22, 2022
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.

Map dragging attribute cannot be modified after initialization
2 participants