Skip to content

Commit

Permalink
fix: fix type error of Player
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Sep 2, 2024
1 parent d4ff951 commit f37a02e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/vgrammar-core/src/component/player.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { isArray, isString, merge, mixin } from '@visactor/vutils';
import type { IGraphic } from '@visactor/vrender-core';
import type {
ContinuousPlayerAttributes,
DiscretePlayerAttributes,
IDiscretePlayer
} from '@visactor/vrender-components';
import type { ContinuousPlayerAttributes, DiscretePlayerAttributes } from '@visactor/vrender-components';
// eslint-disable-next-line no-duplicate-imports
// eslint-disable-next-line no-duplicate-imports
import { ContinuousPlayer, DiscretePlayer } from '@visactor/vrender-components';
Expand Down Expand Up @@ -93,28 +89,28 @@ export class Player extends Component implements IPlayer {

play() {
// FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component
const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;
const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;
player.play();
return this;
}

pause() {
// FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component
const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;
const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;
player.pause();
return this;
}

backward() {
// FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component
const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;
const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;
player.backward();
return this;
}

forward() {
// FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component
const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;
const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;
player.forward();
return this;
}
Expand Down

0 comments on commit f37a02e

Please sign in to comment.