fadeOut.js 659 B

123456789101112131415161718192021
  1. import { effectTiming } from './utils';
  2. /**
  3. * Transform mark from solid to transparent.
  4. */
  5. export const FadeOut = (options) => {
  6. return (from, to, value, coordinate, defaults) => {
  7. const [shape] = from;
  8. const { fillOpacity = 1, strokeOpacity = 1, opacity = 1 } = shape.style;
  9. const keyframes = [
  10. {
  11. fillOpacity,
  12. strokeOpacity,
  13. opacity,
  14. },
  15. { fillOpacity: 0, strokeOpacity: 0, opacity: 0 },
  16. ];
  17. return shape.animate(keyframes, effectTiming(defaults, value, options));
  18. };
  19. };
  20. FadeOut.props = {};
  21. //# sourceMappingURL=fadeOut.js.map