Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23607] Windows: View gets snapped back to center when animating using the right property

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2016-07-07T03:07:09.000+0000
Affected Version/sRelease 5.4.0
Fix Version/sRelease 6.0.0
ComponentsWindows
Labelsqe-5.4.0
ReporterEwan Harris
AssigneeGary Mathews
Created2016-07-01T15:21:28.000+0000
Updated2016-09-05T17:10:46.000+0000

Description

Description

When animating a view and using the right property the view gets snapped back to the centre when the animation has completed. This only happens for the right property, left, top and bottom work as expected.
var win = Ti.UI.createWindow({ backgroundColor: 'green' });
var box = Ti.UI.createView({
    backgroundColor: 'red',
    left: 100,
    height: '100',
    width: '100'
});
win.add(box);
 
var pos = 150;
box.addEventListener('click', function () {
    var a = Ti.UI.createAnimation({
        right: 200,
        bottom: 40,
        duration: 2000,
    });
    a.addEventListener('complete', function () {
       pos += 50;
    });
    box.animate(a);
});
win.open();

Steps to reproduce

Using the code above build to Windows Emulator or device

Click the red box

Actual result

When the animation has finished the view will snap back to the centre of the screen

Expected result

When the animation has finished the view should not snap back to the centre of the screen

Comments

  1. Gary Mathews 2016-07-04

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/766
  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 Lumia 930: 10.0 Lumia 520: 8.1 Right and bottom properties are now retained after animation has completed Closing ticket

JSON Source