fadeIn.js 793 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.FadeIn = void 0;
  4. const utils_1 = require("./utils");
  5. /**
  6. * Transform mark from transparent to solid.
  7. */
  8. const FadeIn = (options) => {
  9. return (from, to, value, coordinate, defaults) => {
  10. const [shape] = from;
  11. const { fillOpacity = 1, strokeOpacity = 1, opacity = 1 } = shape.style;
  12. const keyframes = [
  13. { fillOpacity: 0, strokeOpacity: 0, opacity: 0 },
  14. {
  15. fillOpacity,
  16. strokeOpacity,
  17. opacity,
  18. },
  19. ];
  20. return shape.animate(keyframes, (0, utils_1.effectTiming)(defaults, value, options));
  21. };
  22. };
  23. exports.FadeIn = FadeIn;
  24. exports.FadeIn.props = {};
  25. //# sourceMappingURL=fadeIn.js.map