Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2561] Animating a view's position to a negative dimension fails

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2013-05-10T22:00:59.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsanimate, animated, animation, animations, view
ReporterFokke Zandbergen
AssigneeShak Hossain
Created2013-05-08T15:05:54.000+0000
Updated2016-03-08T07:41:37.000+0000

Description

Animating a view's position to a negative dimension doesn't work. The view is re-positioned, but with no animation as the following code demonstrates:
var hidden = false;

var win = Ti.UI.createWindow();
var view = Ti.UI.createView({top:0,height:200});
var button = Ti.UI.createButton({bottom:0,title:'Toggle'});

button.addEventListener('click', function () {
  myView.animate(Ti.UI.createAnimation({
    duration: 2000,
    delay: 0,
    top: hidden ? 0 : -200
  }));
  hidden = !hidden;
});

win.add(view);
win.add(button);
win.open();

Comments

  1. Fokke Zandbergen 2013-05-09

    After further testing it seems like it does work, but only if there are not auto-sizes involved.
  2. Daniel Sefton 2013-05-10

    Which platform? Which platform OS version? So are you saying the test case you provided in the description works? Can you provide a non-working example?
  3. Fokke Zandbergen 2013-05-10

    Sorry for this waisting your time on this issue. Even I can't reproduce it anymore. I think it was multiple factors involved that caused the strange behaviour I saw. Close it :)
  4. Daniel Sefton 2013-05-10

    Ok, no problem. Closing.

JSON Source