fadeIn.js 656 B

123456789101112131415161718192021
  1. import { effectTiming } from './utils';
  2. /**
  3. * Transform mark from transparent to solid.
  4. */
  5. export const FadeIn = (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. { fillOpacity: 0, strokeOpacity: 0, opacity: 0 },
  11. {
  12. fillOpacity,
  13. strokeOpacity,
  14. opacity,
  15. },
  16. ];
  17. return shape.animate(keyframes, effectTiming(defaults, value, options));
  18. };
  19. };
  20. FadeIn.props = {};
  21. //# sourceMappingURL=fadeIn.js.map