[AC-2561] Animating a view's position to a negative dimension fails
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-05-10T22:00:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | animate, animated, animation, animations, view |
Reporter | Fokke Zandbergen |
Assignee | Shak Hossain |
Created | 2013-05-08T15:05:54.000+0000 |
Updated | 2016-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();
After further testing it seems like it does work, but only if there are not auto-sizes involved.
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?
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 :)
Ok, no problem. Closing.