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
| Parameter | Type | Description |
|---|---|---|
animationID | string | The running animation to pause |
data | object | An optional parameter containing extra arguments to set. See Animation Data Object for details. |
Animation Data Object
| Key | Type | Description |
|---|---|---|
id | string | The animation id used in the case of multiple animations with the same name. |
context | string | The 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);
}