UNPKG

790 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MaybeFunctionAttribute = void 0;
4const util_1 = require("@antv/util");
5/**
6 * Mark functional attribute constant.
7 */
8const MaybeFunctionAttribute = () => {
9 return (I, mark) => {
10 const { style = {} } = mark;
11 return [
12 I,
13 (0, util_1.deepMix)({}, mark, {
14 style: Object.assign(Object.assign({}, style), Object.fromEntries(Object.entries(style)
15 .filter(([, v]) => typeof v === 'function')
16 .map(([k, v]) => [k, () => v]))),
17 }),
18 ];
19 };
20};
21exports.MaybeFunctionAttribute = MaybeFunctionAttribute;
22exports.MaybeFunctionAttribute.props = {};
23//# sourceMappingURL=maybeFunctionAttribute.js.map
\No newline at end of file