Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/vchart/src/series/bar/animation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Factory } from '../../core/factory';
import { DEFAULT_ANIMATION_CONFIG } from '../../animation/config';
import { Direction } from '../../typings/space';
// eslint-disable-next-line no-duplicate-imports
import type { Datum } from '../../typings';
Expand Down Expand Up @@ -75,7 +76,7 @@ export const registerBarAnimation = () => {
appear: barPresetAnimation(params, preset),
enter: barGrowIn(params, false),
exit: barGrowOut(params, false),
disappear: barGrowOut(params)
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
};
});
};
3 changes: 2 additions & 1 deletion packages/vchart/src/series/circle-packing/animation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IAnimationTypeConfig } from '../../animation/interface';
import { Factory } from '../../core/factory';
import { DEFAULT_ANIMATION_CONFIG } from '../../animation/config';
import type { CirclePackingAppearPreset } from './interface';

export const circlePackingPresetAnimation = (preset: CirclePackingAppearPreset): IAnimationTypeConfig => {
Expand All @@ -23,6 +24,6 @@ export const registerCirclePackingAnimation = () => {
appear: circlePackingPresetAnimation(preset),
enter: { type: 'growRadiusIn' },
exit: { type: 'growRadiusOut' },
disappear: { type: 'growRadiusOut' }
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
}));
};
3 changes: 2 additions & 1 deletion packages/vchart/src/series/gauge/animation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IAnimationTypeConfig } from '../../animation/interface';
import { Factory } from '../../core';
import { DEFAULT_ANIMATION_CONFIG } from '../../animation/config';

export type ProgressLikeAppearPreset = 'grow' | 'fadeIn';

Expand Down Expand Up @@ -36,7 +37,7 @@ export const registerGaugePointerAnimation = () => {
return {
appear: animation,
enter: animation,
disappear: { type: 'fadeOut' }
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
};
}
);
Expand Down
3 changes: 2 additions & 1 deletion packages/vchart/src/series/polar/progress-like/animation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IAnimationTypeConfig } from '../../../animation/interface';
import { Factory } from '../../../core/factory';
import { DEFAULT_ANIMATION_CONFIG } from '../../../animation/config';
import type { IProgressLikeAnimationParams, ProgressLikeAppearPreset } from './interface';

const Appear_Grow = (params: IProgressLikeAnimationParams): IAnimationTypeConfig => ({
Expand Down Expand Up @@ -28,7 +29,7 @@ export const registerProgressLikeAnimation = () => {
(params: IProgressLikeAnimationParams, preset: ProgressLikeAppearPreset) => ({
appear: progressLikePresetAnimation(params, preset),
enter: { type: 'growAngleIn' },
disappear: { type: 'growAngleOut' }
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
})
);
};
3 changes: 2 additions & 1 deletion packages/vchart/src/series/sankey/animation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// eslint-disable-next-line no-duplicate-imports
import { Direction } from '../../typings/space';
import { Factory } from '../../core/factory';
import { DEFAULT_ANIMATION_CONFIG } from '../../animation/config';
import { FadeInOutAnimation } from '../../animation/config';
import type { ISankeyAnimationParams, SankeyAppearPreset } from './interface';
import type { IAnimationTypeConfig, IAnimationParameters } from '../../animation/interface';
Expand Down Expand Up @@ -226,7 +227,7 @@ export const registerSankeyAnimation = () => {
appear: sankeyLinkPresetAnimation(preset),
enter: { type: 'linkPathGrowIn' },
exit: { type: 'linkPathGrowOut' },
disappear: { type: 'linkPathGrowOut' }
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
}));
AnimateExecutor.registerBuiltInAnimate('linkPathGrowOut', LinkPathGrowOut);
AnimateExecutor.registerBuiltInAnimate('linkPathGrowIn', LinkPathGrowIn);
Expand Down
3 changes: 2 additions & 1 deletion packages/vchart/src/series/treemap/animation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IAnimationTypeConfig } from '../../animation/interface';
import { Factory } from '../../core/factory';
import { DEFAULT_ANIMATION_CONFIG } from '../../animation/config';
import type { TreemapAppearPreset } from './interface';

export const treemapPresetAnimation = (preset: TreemapAppearPreset): IAnimationTypeConfig => {
Expand Down Expand Up @@ -27,7 +28,7 @@ export const registerTreemapAnimation = () => {
appear: treemapPresetAnimation(preset),
enter: { type: 'growCenterIn' },
exit: { type: 'growCenterOut' },
disappear: { type: 'growCenterOut' }
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
};
});
};
5 changes: 3 additions & 2 deletions packages/vchart/src/series/venn/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { VennAppearPreset } from './interface';
import type { IAnimationTypeConfig } from '../../animation/interface';
// import { ACustomAnimate } from '@visactor/vrender-animate';
import { Factory } from '../../core/factory';
import { DEFAULT_ANIMATION_CONFIG } from '../../animation/config';

export const vennCirclePresetAnimation = (preset: VennAppearPreset): IAnimationTypeConfig => {
switch (preset) {
Expand Down Expand Up @@ -96,7 +97,7 @@ export const registerVennAnimation = () => {
appear: vennCirclePresetAnimation(preset),
enter: { type: 'growRadiusIn' },
exit: { type: 'growRadiusOut' },
disappear: { type: 'growRadiusOut' }
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
};
});
Factory.registerAnimation('vennOverlap', (params: unknown, preset: VennAppearPreset) => {
Expand All @@ -105,7 +106,7 @@ export const registerVennAnimation = () => {
update: { custom: VennOverlapAnimation },
enter: { type: 'fadeIn' },
exit: { type: 'fadeOut' },
disappear: { type: 'fadeOut' }
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
};
});
};
3 changes: 2 additions & 1 deletion packages/vchart/src/series/waterfall/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { barGrowIn, barGrowOut } from '../bar/animation';
import { Factory } from '../../core/factory';
import type { WaterfallAppearPreset } from './interface';
import type { IAnimationTypeConfig } from '../../animation/interface';
import { DEFAULT_ANIMATION_CONFIG } from '../../animation/config';

const Appear_FadeIn: IAnimationTypeConfig = {
type: 'fadeIn'
Expand Down Expand Up @@ -32,7 +33,7 @@ export const registerWaterfallAnimation = () => {
appear: waterfallPresetAnimation(params, preset),
enter: barGrowIn(params, false),
exit: barGrowOut(params, false),
disappear: barGrowOut(params, false)
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
};
});
};
2 changes: 1 addition & 1 deletion packages/vchart/src/series/word-cloud/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ export const registerWordCloudAnimation = () => {
appear: wordcloudPresetAnimation(params, preset),
enter: { type: 'fadeIn' },
exit: { type: 'fadeOut' },
disappear: { type: 'fadeOut' }
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
}));
};
Loading