Skip to content

Commit

Permalink
feat: added method to stop animation (#1457)
Browse files Browse the repository at this point in the history
* feat: added method to stop animation

* feat: stop animation method in Cluster

* feat: stop animation method in Cluster

* feat: stop animation method in Cluster

* feat: stop animation method in Cluster
  • Loading branch information
kikoso authored Feb 5, 2025
1 parent 800e07f commit ed99d45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,12 @@ public void setAnimationDuration(long animationDurationMs) {
mAnimationDurationMs = animationDurationMs;
}

public void stopAnimation() {
for (AnimationTask animation : ongoingAnimations) {
animation.cancel();
}
}

private static double distanceSquared(Point a, Point b) {
return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ public void removeOnAnimationComplete(MarkerManager markerManager) {
mMarkerManager = markerManager;
mRemoveOnComplete = true;
}

@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
if (to == null || from == null || marker == null) {
Expand Down

0 comments on commit ed99d45

Please sign in to comment.