Performs the specified window transitions.
Transition Types
Opacity
opacity: {
opacity: 0.5, //This value is clamped from 0.0 to 1.0
duration: 1000 //The total time in milliseconds this transition should take.
}
Position
position: {
left: 10, //Defaults to the window's current left position in virtual screen coordinates.
top: 25, //Defaults to the window's current top position in virtual screen coordinates.
duration: 500 //The total time in milliseconds this transition should take.
}
Size
size: {
width: 600, //Optional if height is present. Defaults to the window's current width.
height: 400, //Optional if width is present. Defaults to the window's current height.
duration: 2500 //The total time in milliseconds this transition should take.
}
Options Object
Options
{
interrupt: true // This option interrupts the current animation. When false it pushes this animation onto the end of the animation queue.
}
Example
var finWindow = fin.desktop.Window.getCurrent();
finWindow.animate({
opacity: {
opacity: 0.15,
duration:1000
},
position: {
left: 10,
top: 10,
duration: 3000
}
},
{
interrupt: false
},
//Callback will only fire after both "opacity" and "position" have finished animating.
function (evt) {
// Callback
});