Closed CharlesVoita closed 9 years ago
+1
Found this very useful, but would like to hear from famo.us team if there's a better way to do this.
I made a temp solution to this until F/A supports true sizing of elements inside a ScrollView. http://stackoverflow.com/questions/26445552/scroll-view-not-scrolling-with-surface-fa-size-undefined-true/26534407?noredirect=1#comment41718130_26534407
I am going to close this. Please reopen it if it is still an issue. Thanks - Jordan
Could not find a simple way to setSize of ScrollView
fa-surface
to pixel size of content within. The solution I came up with is dirty/hacky but may help others in the future. Not only that, but I am using$timeline
and transitionables to animate eachfa-surface
. I tried to minimize the amount of unneeded code as much as possible this example.Note
getIndexHeight($index)
, which will be getting the dynamic height. In my controller I have the following (note the object can just as easily be an array).Then for my
fa-animate-enter
, I have the following:Note that I am using a function to animate a
transitionable
. The reason I have the$scope.setIndexHeight($index);
not within the callback function is because it will not be called until the animation is over. This will cause an unintended delay (in my actual code I am using at.delay()
). WithoutsetTimeout
,setIndexHeight
will not find the element. The animation will not start until the height is set, so it is good that height will initially returnundefined
.