Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1110] Animation of width within a scrollview does not have expected behavior

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-07-09T22:34:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsanimation, scrollview
Reportered bond
AssigneeMauro Parra-Miranda
Created2014-06-02T06:44:53.000+0000
Updated2016-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 )

Comments

  1. Mauro Parra-Miranda 2014-06-30

    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,
  2. Mauro Parra-Miranda 2014-07-09

    Customer hasn't replied yet.

JSON Source