| 123456789101112131415161718192021222324252627282930 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.GrowInY = void 0;
- const g_1 = require("@antv/g");
- const scaleInY_1 = require("./scaleInY");
- /**
- * Scale mark from nothing to desired shape in x direction.
- */
- const GrowInY = (options) => {
- return (from, to, value, coordinate, defaults) => {
- const [shape] = from;
- const { height, width } = shape.getBoundingClientRect();
- const clipPath = new g_1.Path({
- style: {
- path: `M0,0L${width},0L${width},${height}L0,${height}Z`,
- },
- });
- shape.appendChild(clipPath);
- shape.style.clipPath = clipPath;
- const animation = (0, scaleInY_1.ScaleInY)(options)([clipPath], to, value, coordinate, defaults);
- animation.finished.then(() => {
- clipPath.remove();
- shape.style.clipPath = null;
- });
- return animation;
- };
- };
- exports.GrowInY = GrowInY;
- exports.GrowInY.props = {};
- //# sourceMappingURL=growInY.js.map
|