diff --git a/packages/vchart/src/component/base/base-component.ts b/packages/vchart/src/component/base/base-component.ts index 971b15a6fa..f234ae3287 100644 --- a/packages/vchart/src/component/base/base-component.ts +++ b/packages/vchart/src/component/base/base-component.ts @@ -12,7 +12,7 @@ import type { Datum, ILayoutRect } from '../../typings'; import type { IComponentSpec } from './interface'; import { LayoutModel } from '../../model/layout-model'; import { BaseComponentSpecTransformer } from './base-component-transformer'; -import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface'; +import type { IModelSpecInfo } from '../../model/interface'; export class BaseComponent extends LayoutModel implements IComponent { static transformerConstructor = BaseComponentSpecTransformer; diff --git a/packages/vchart/src/component/custom-mark/custom-mark.ts b/packages/vchart/src/component/custom-mark/custom-mark.ts index 811b384ac7..011dc66c1e 100644 --- a/packages/vchart/src/component/custom-mark/custom-mark.ts +++ b/packages/vchart/src/component/custom-mark/custom-mark.ts @@ -1,16 +1,13 @@ import { BaseComponent } from '../base/base-component'; import { ComponentTypeEnum } from '../interface/type'; // eslint-disable-next-line no-duplicate-imports -import type { IRegion } from '../../region/interface'; -import type { IModelRenderOption } from '../../model/interface'; import { LayoutLevel, LayoutZIndex } from '../../constant/layout'; import { PREFIX } from '../../constant/base'; import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec, ILayoutRect } from '../../typings'; -import { MarkTypeEnum, type IGroupMark, type IMark } from '../../mark/interface'; +import { IComponentMark, MarkTypeEnum, type IGroupMark } from '../../mark/interface'; // eslint-disable-next-line no-duplicate-imports import { Bounds, isEqual, isNil, isValid, isValidNumber } from '@visactor/vutils'; import { Factory } from '../../core/factory'; -import type { IGraphic } from '@visactor/vrender-core'; import { animationConfig, userAnimationConfig } from '../../animation/utils'; import type { IModelMarkAttributeContext } from '../../compile/mark/interface'; @@ -195,13 +192,13 @@ export class CustomMark extends BaseComponent> { getVRenderComponents() { const comps: any[] = []; - const checkFunc = (m: IMark) => { + const checkFunc = (m: IComponentMark) => { if (m && m.type === MarkTypeEnum.group) { m.getMarks().forEach(child => { - checkFunc(child as IMark); + checkFunc(child as IComponentMark); }); } else if (m.type === MarkTypeEnum.component) { - const comp = m?.getProduct()?.getGroupGraphicItem(); + const comp = m?.getComponent(); if (comp) { comps.push(comp); @@ -210,7 +207,7 @@ export class CustomMark extends BaseComponent> { }; this.getMarks().forEach(m => { - checkFunc(m); + checkFunc(m as IComponentMark); }); return comps; diff --git a/packages/vchart/src/series/treemap/treemap.ts b/packages/vchart/src/series/treemap/treemap.ts index af9e035c19..d5dce99c3d 100644 --- a/packages/vchart/src/series/treemap/treemap.ts +++ b/packages/vchart/src/series/treemap/treemap.ts @@ -479,7 +479,7 @@ export class TreemapSeries extends CartesianSeries { }); [this._labelMark, this._nonLeafLabelMark].forEach(m => { if (m && m.getComponent()) { - m.getComponent().getProduct().getGroupGraphicItem().enableAnimation(); + m.getComponent().getProduct().enableAnimation(); } }); // 在所有动画执行之后关闭动画 @@ -492,7 +492,7 @@ export class TreemapSeries extends CartesianSeries { }); [this._labelMark, this._nonLeafLabelMark].forEach(m => { if (m && m.getComponent()) { - m.getComponent().getProduct().getGroupGraphicItem().disableAnimation(); + m.getComponent().getProduct().disableAnimation(); } }); }