fadeOut.js 799 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.FadeOut = void 0;
  4. const utils_1 = require("./utils");
  5. /**
  6. * Transform mark from solid to transparent.
  7. */
  8. const FadeOut = (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. {
  14. fillOpacity,
  15. strokeOpacity,
  16. opacity,
  17. },
  18. { fillOpacity: 0, strokeOpacity: 0, opacity: 0 },
  19. ];
  20. return shape.animate(keyframes, (0, utils_1.effectTiming)(defaults, value, options));
  21. };
  22. };
  23. exports.FadeOut = FadeOut;
  24. exports.FadeOut.props = {};
  25. //# sourceMappingURL=fadeOut.js.map