Skip to main content
Version: 9.0.2

sb.animationResume

sb.animationResume(animationID, data)
// OR
sb.animationResume("animation_name")

Pause a running animation. If an animationID is used to pause the animation, then it must be the return value from sb.animationCreate(). If a name is used to pause an animation, then that name must be the name of the animation specified in Designer. This function can take an optional parameter, data. The data parameter is an object that contains variables for the extra arguments to set.

Parameters

ParameterTypeDescription
animationIDstringThe running animation to pause
dataobjectAn optional parameter containing extra arguments to set. See Animation Data Object for details.

Animation Data Object

KeyTypeDescription
id stringThe animation id used in the case of multiple animations with the same name.
context stringThe fully qualified name of an object in the model which will be used as the context for the animation.

Example

function resumeAnimation(id) {
//Resume the animation
sb.animationResume(id)
}

//Example of using ab.animationResume passing animation names.
function cbResumeCur5day() {
if(cur5dayToggle == false) {
sb.animationResume("show_5day");
} else {
sb.animationResume("hide_mon_to_fri");
}
}

//Example of using sb.animationResume with context.
function cb_resume_cur_5day() {
var data = {};
data.context = "Layer1.mycontrol";
sb.animationResume("show_5day", data);
}