Commit 449dfec
committed
feat: Add animation to hide method
This change introduces an animation to the `hide()` method, making the annotation disappear with a reverse animation of the `show()` method.
Previously, `hide()` would immediately remove the annotation's SVG elements from the DOM. This change modifies the `hide()` method to:
- Play the `show()` animation in reverse.
- Use `requestAnimationFrame` to ensure the animation restart is smooth.
- Use `setTimeout` to remove the SVG elements only after the animation has completed. This prevents race conditions when `show()` is called again while a `hide()` animation is in progress.
This addresses issue #57.1 parent 668ba82 commit 449dfec
2 files changed
+294
-122
lines changed
0 commit comments