PDA

View Full Version : animation background style



openthesky7
28 Feb 2011, 9:41 AM
In Sencha Touch framework there is no method to set style for background during animation.

To correct this in definition of Ext.Anim (sencha-touch-debug.js) you have to change following code:



if (config.is3d === true) {

el.parent().addCls('x-animation');

el.parent().setStyle({
// 'background-color': 'black',
'-webkit-perspective': '1200',
'-webkit-transform-style': 'preserve-3d'
});
}


Now you will have to only define x-animation in css file:



.x-animation {
background-color: black;
}


VoilĂ ! :)

openthesky7
1 Mar 2011, 1:17 AM
Better works:




el.parent().addCls('x-animation');

if (config.is3d === true) {
el.parent().setStyle({

'-webkit-perspective': '1200',
'-webkit-transform-style': 'preserve-3d'
});
}



Now it works with any animation.