Description
When using the code below, when the animation is complete the opacity property will be what it was set to before the animation started.
var win = Ti.UI.createWindow({backgroundColor: 'red'}),
img = Ti.UI.createImageView({width: '80%', height: '80%', image:'Logo.png', opacity:0.5});
var anim = Ti.UI.createAnimation({
opacity:1,
duration:1000
});
win.addEventListener('click', function(){
img.animate(anim);
});
win.add(img);
win.open();
*This a regression that first appears in 5.3.0.GA,*
*Workaround*
As a workaround add an eventListener for the complete event and then set the property as required like below
anim.addEventListener('complete', function(){
img.opacity = 1;
});
Steps to reproduce
Using the code above, build for Windows Platform appc run -p windows -T wp-emulator -C 10-0-1
Click the screen
Actual result
At the end of the animation the opacity of the image will return to the original value
Expected
The value at the end of the animation should be what is defined in the animation
master: https://github.com/appcelerator/titanium_mobile_windows/pull/782
Verified using: OS: Microsoft Windows 10 Pro 10.0.14393 Appc core: 6.0.0-38 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160904203840 Opacity value is now retained at the end of the animation Closing ticket