qooxdoo : Rotate Button along its center -


i have qx.ui.form.button. rotate 180 degree ( i.e. upside down ) along center when click button. (i'm working on qx.desktop )

var btn = new qx.ui.form.button(null, "myproject/button.png"); btn.addlistener("click", function () {   // function should use ? }); 

the rotation should have animation, i.e. rotate clockwise.

qooxdoo not have transformations build in widget layer offers way animate / rotate dom elements. have container element of button , start animation on that:

var el = btn.getcontainerelement().getdomelement(); qx.bom.element.animation.animate(el, {   duration: 1000, timing: "ease", keep: 100, keyframes : {     0: {rotate: "0deg"},       // ["0deg"] flipping effect     100 : {rotate : "180deg"}  // ["180deg"] flipping effect   } }); 

check out documentation of animate function see how code works: http://demo.qooxdoo.org/current/apiviewer/#qx.bom.element.animation~animate

and here working playground sample: http://tinyurl.com/cnbebyn


Comments