UNPKG

734 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MaybeIdentityX = 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 MaybeIdentityX = () => {
11 return (I, mark) => {
12 const { encode } = mark;
13 const { x1 } = encode;
14 if (x1)
15 return [I, mark];
16 const [X] = (0, helper_1.columnOf)(encode, 'x');
17 return [I, (0, util_1.deepMix)({}, mark, { encode: { x1: (0, helper_1.column)([...X]) } })];
18 };
19};
20exports.MaybeIdentityX = MaybeIdentityX;
21exports.MaybeIdentityX.props = {};
22//# sourceMappingURL=maybeIdentityX.js.map
\No newline at end of file