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

fix: rerender overlay on draggable prop change for correct drag implementation #317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Infinity1high
Copy link

Current issue:
We have different modes for drawing figures on the map and placing markers, that is why draggable prop is changed dynamically depending on the mode selected. At the moment to rerender overlay we do deep comparison only on lat and lng props change, do not taking into account draggable prop which causes incorrect behaviour

…mentation

Current issue:
We have different modes for drawing figures on the map and placing markers, that is why draggable prop is changed dynamically depending on the mode selected.
At the moment to rerender overlay we do deep comparison only on lat and lng props change, do not taking into account draggable prop which causes incorrect behaviour
Copy link

codesandbox bot commented Nov 20, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Owner

@giorgiabosello giorgiabosello left a comment

Choose a reason for hiding this comment

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

I need to take a look at this, because it's not just about draggable, each prop you pass to children could change. This is why only lat and lng have been considered.
Maybe there's a better way of doing this, like passing a custom function to do the comparing.

Copy link
Owner

@giorgiabosello giorgiabosello left a comment

Choose a reason for hiding this comment

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

I need to take a look at this, because it's not just about draggable, each prop you pass to children could change. This is why only lat and lng have been considered.
Maybe there's a better way of doing this, like passing a custom function to do the comparing.

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