Skip to content

Commit

Permalink
feat: add selectItem
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Jul 16, 2019
1 parent 7458e54 commit dbd9dc3
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@ export default class Timeline extends PureProps<TimelineProps, TimelineState> {

scene && scene.finish();
}
public selectItem(scene: Scene | SceneItem) {
const { timelineInfo, selectedTime } = this.state;

for (const name in timelineInfo) {
const info = timelineInfo[name];
if (info.item === scene) {

this.select(info.key, selectedTime);
break;
}
}
}
public togglePlay = () => {
const scene = this.props.scene;
if (!scene) {
Expand Down

0 comments on commit dbd9dc3

Please sign in to comment.