简体   繁体   中英

Gracefully Pause or Resume SVG Animation using Rum or Reagent in ClojureScript

How do you pause a running SVG animation using <animateTransform> element inside an SVG without losing the animation state?

Setting animation-play-state: paused; on either the animating element, or the parent element has no effect. Changing the repeatCount from indefinite to 0 , loses the animation state.

Kinda late, but here is how to do it in vanilla javascript: https://codepen.io/jjdewitt/pen/XJRqNK?editors=1010

You need to call yourSvgElement.pauseAnimations(); on the SVG Element

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM