UNPKG

767 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MaybeZeroZ = void 0;
4const util_1 = require("@antv/util");
5const helper_1 = require("./utils/helper");
6/**
7 * Add zero constant encode for z channel.
8 */
9const MaybeZeroZ = () => {
10 return (I, mark) => {
11 const { encode } = mark;
12 const { z } = encode;
13 if (z !== undefined)
14 return [I, mark];
15 return [
16 I,
17 (0, util_1.deepMix)({}, mark, {
18 encode: { z: (0, helper_1.inferredColumn)((0, helper_1.constant)(I, 0)) },
19 scale: { z: { guide: null } },
20 }),
21 ];
22 };
23};
24exports.MaybeZeroZ = MaybeZeroZ;
25exports.MaybeZeroZ.props = {};
26//# sourceMappingURL=maybeZeroZ.js.map
\No newline at end of file