import { BaseExtension } from '../registry/extension';
import type { DrawContext } from '../runtime/element';
import type { CustomBehaviorOption } from '../spec/behavior';
import type { DrawData } from './types';
export type BaseTransformOptions = CustomBehaviorOption;
/**
* 数据转换的基类
*
* Base class for data transforms
*/
export abstract class BaseTransform extends BaseExtension {
public beforeDraw(data: DrawData, context: DrawContext): DrawData {
return data;
}
public afterLayout(type: 'pre', data: DrawData): void;
public afterLayout(type: 'post', data?: undefined): void;
public afterLayout(type: 'pre' | 'post', data?: DrawData) {}
}