UNPKG

734 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MaybeIdentityY = void 0;
4const util_1 = require("@antv/util");
5const helper_1 = require("./utils/helper");
6/**
7 * Add 3 constant encode for size channel.
8 * This is useful for point geometry.
9 */
10const MaybeIdentityY = () => {
11 return (I, mark) => {
12 const { encode } = mark;
13 const { y1 } = encode;
14 if (y1)
15 return [I, mark];
16 const [Y] = (0, helper_1.columnOf)(encode, 'y');
17 return [I, (0, util_1.deepMix)({}, mark, { encode: { y1: (0, helper_1.column)([...Y]) } })];
18 };
19};
20exports.MaybeIdentityY = MaybeIdentityY;
21exports.MaybeIdentityY.props = {};
22//# sourceMappingURL=maybeIdentityY.js.map
\No newline at end of file