UNPKG

cione-comp-lib

Version:

`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`

21 lines (20 loc) 916 B
import { visualMapActionInfo, visualMapActionHander } from "./visualMapAction.mjs"; import { visualMapEncodingHandlers } from "./visualEncoding.mjs"; import { each } from "../../../../zrender/lib/core/util.mjs"; import visualMapPreprocessor from "./preprocessor.mjs"; var installed = false; function installCommon(registers) { if (installed) { return; } installed = true; registers.registerSubTypeDefaulter("visualMap", function(option) { return !option.categories && (!(option.pieces ? option.pieces.length > 0 : option.splitNumber > 0) || option.calculable) ? "continuous" : "piecewise"; }); registers.registerAction(visualMapActionInfo, visualMapActionHander); each(visualMapEncodingHandlers, function(handler) { registers.registerVisual(registers.PRIORITY.VISUAL.COMPONENT, handler); }); registers.registerPreprocessor(visualMapPreprocessor); } export { installCommon as default };