UNPKG

730 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MaybeSize = 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 MaybeSize = () => {
11 return (I, mark) => {
12 const { encode } = mark;
13 const { size } = encode;
14 if (size !== undefined)
15 return [I, mark];
16 return [
17 I,
18 (0, util_1.deepMix)({}, mark, { encode: { size: (0, helper_1.visualColumn)((0, helper_1.constant)(I, 3)) } }),
19 ];
20 };
21};
22exports.MaybeSize = MaybeSize;
23exports.MaybeSize.props = {};
24//# sourceMappingURL=maybeSize.js.map
\No newline at end of file