Added PLAY · PAUSE button and play direction switching button.
Import control objects from Harmoware-VIS.
// before
import {
Container, connectToHarmowareVis, HarmoVisLayers, MovesLayer, MovesInput
} from 'harmoware-vis';
// after
import {
Container, connectToHarmowareVis, HarmoVisLayers, MovesLayer, MovesInput,
PlayButton, PauseButton, ForwardButton, ReverseButton
} from 'harmoware-vis';
Get necessary state from Harmoware-VIS props.
// before
const { actions, clickedObject, inputFileName, viewport,
routePaths, lightSettings, movesbase, movedData } = this.props;
// after
const { actions, clickedObject, inputFileName, viewport,
routePaths, lightSettings, movesbase, movedData,
animatePause, animateReverse } = this.props;
Added Harmoware-VIS control object to JSX.
// add in ul tag group
<li className="flex_row">
{animatePause ?
<PlayButton actions={actions} /> : <PauseButton actions={actions} />
}
{animateReverse ?
<ForwardButton actions={actions} /> : <ReverseButton actions={actions} />
}
</li>