123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- import brushPreprocessor from './preprocessor.js';
- import BrushView from './BrushView.js';
- import BrushModel from './BrushModel.js';
- import brushVisual from './visualEncoding.js';
- import BrushFeature from '../toolbox/feature/Brush.js';
- import { registerFeature } from '../toolbox/featureManager.js';
- import { noop } from 'zrender/lib/core/util.js';
- export function install(registers) {
- registers.registerComponentView(BrushView);
- registers.registerComponentModel(BrushModel);
- registers.registerPreprocessor(brushPreprocessor);
- registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, brushVisual);
- registers.registerAction({
- type: 'brush',
- event: 'brush',
- update: 'updateVisual'
- }, function (payload, ecModel) {
- ecModel.eachComponent({
- mainType: 'brush',
- query: payload
- }, function (brushModel) {
- brushModel.setAreas(payload.areas);
- });
- });
-
- registers.registerAction({
- type: 'brushSelect',
- event: 'brushSelected',
- update: 'none'
- }, noop);
- registers.registerAction({
- type: 'brushEnd',
- event: 'brushEnd',
- update: 'none'
- }, noop);
- registerFeature('brush', BrushFeature);
- }
|