Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23653] Windows: Animation returns to original opacity property when finished

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2016-07-20T04:57:03.000+0000
Affected Version/sRelease 5.4.0, Release 5.3.0
Fix Version/sRelease 6.0.0
ComponentsWindows
Labelsqe-5.4.0, regression
ReporterEwan Harris
AssigneeGary Mathews
Created2016-07-19T14:55:20.000+0000
Updated2016-09-05T15:25:12.000+0000

Description

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

Comments

  1. Gary Mathews 2016-07-19

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/782
  2. Ewan Harris 2016-09-05

    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

JSON Source