Solved
How to end playing sequence after steps are done.
After all the steps are done playing, I don't want the steps to start from the beginning again. How should I stop playing after all the steps are played once?
After all the steps are done playing, I don't want the steps to start from the beginning again. How should I stop playing after all the steps are played once?
You can watch for stepcompleted event, and if it's the last step in the sequence, then disable the play button or take some other action to prevent repeating the sequence. Something like this:
$scope.$on('stepcompleted', ()=>{
console.log("step " + $scope.getWidgetProp("model-1","currentStep") + " of " + $scope.getWidgetProp("model-1","steps") + " completed");
if ($scope.getWidgetProp("model-1","currentStep")==$scope.getWidgetProp("model-1","steps")) {
// end of last step, so hide play button to prevent repeating
$scope.setWidgetProp("playbutton","visible",false);
}
});Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.