-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fixed annotation dragging behavior #25
Conversation
…state update - the drag event of an annotation was stopped when there was a state update of any annotion. This made it impossible to drag an annotation while updating anything else on the map. Signed-off-by: Roman Bapst <bapstroman@gmail.com>
For me it makes sense to separate the two. |
Are the unit tests expected to pass? 😅 |
At some point :) |
Oh, merged already! May I ask how it works with releases? Should we expect those changes to be pushed to a maven repository at some point? 😇 |
@ovivoda: kindly pinging here? 🙂 |
@@ -136,7 +136,7 @@ public T create(S options) { | |||
T t = options.build(currentId, this); | |||
annotations.put(t.getId(), t); | |||
currentId++; | |||
updateSource(); | |||
internalUpdateSource(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RomanBapst What is the reason you changed updateSource()
to internalUpdateSource()
here? It undoes the improvements from #12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the drag event of an annotation was stopped when there was a state update
of any annotion. This made it impossible to drag an annotation while updating
anything else on the map.
Problem encountered without this change
Updating the position of any annotation on the map would cause dragging of another annotation to be stopped. We encountered this issue when trying to implement a polygon with draggable vertices.
Solution
Only stop the drag if the updated annotation is also the dragged annotation.