template "widget[@type='Animate']", mode="widget_class"{
class AnimateWidget extends Widget{
// change animation properties
this.element.children[0].setAttribute("dur", String(this.speed)+"s")
let width = this.element.getAttribute("width");
let height = this.element.getAttribute("height");
this.element.setAttribute("x",width/-2);
this.element.setAttribute("y",height/-2);
template "widget[@type='Animate']", mode="widget_defs" {