[AC-1110] Animation of width within a scrollview does not have expected behavior
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-07-09T22:34:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | animation, scrollview |
Reporter | ed bond |
Assignee | Mauro Parra-Miranda |
Created | 2014-06-02T06:44:53.000+0000 |
Updated | 2016-03-08T07:37:28.000+0000 |
Description
If I have a scrollview ( horizontal layout, no wrap )
I then add a view with a width of 1px ( it doesn't work with 0 ) and then animate it like:
view.animate({
width: 200,
duration:1000,
},function() {
});
};
It will create an "empty" space to ease the width into.
I would assume that the width would grow and the items to the right would get shifted.
The workaround I used is as follows:
_.defer (function(){
var newWidth = Math.floor(width);
var segments = 100;
var duration = 400;
var deltaStep = newWidth/segments;
_(segments).times(function(n){
_.delay( function() {
detailedView.setWidth(n * deltaStep);
},duration * (n/segments));
});
});
Seems a bit much to the desired effect ( very simple equation, no easing etc )
Hello [~firl]! Thanks for your report. Can you please help us to move this to Ti Mobile? We need some texts here: 1. Description of the problem 2. Runnable Testcase 3. Expected behavior 4. Actual behavior Best Regards,
Customer hasn't replied yet.