animate¶
webix.
animate
(html_element, config)¶webix.animate helper.
Please look into the linked official documentation.
Referenced by¶
- helpers
end()
,animate()
,animateView()
.- mixins
Scrollable()
.- views
grouplist()
,multiview()
,window()
.
External references¶
Code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | webix.animate = function(html_element, config){
var animation = config;
if (webix.isArray(html_element)){
for (var i=0; i < html_element.length; i++) {
if(webix.isArray(config))
animation = config[i];
if(animation.type == 'slide'){
if(animation.subtype == 'out' && i===0) { // next
continue;
}
if(animation.subtype == 'in' && i==1) { // current
continue;
}
}
if(animation.type == 'flip'){
var animation_copy = webix.clone(animation);
if(i===0) { // next
animation_copy.type = 'flipback';
}
if(i==1) { // current
animation_copy.callback = null;
}
webix.animate(html_element[i], animation_copy);
continue;
}
webix.animate(html_element[i], animation);
}
return;
}
var node = webix.toNode(html_element);
if (node._has_animation)
webix.animate.end(node, animation);
else
webix.animate.start(node, animation);
};
|