IjzerenHein / famous-flex

Animatable layouts, FlexScrollView & widgets for famo.us.
MIT License
279 stars 44 forks source link

Manipulating sizes individually in famous-flex #85

Closed kakajansh closed 9 years ago

kakajansh commented 9 years ago

For example, in a List Layout how can I manipulate size of one surface on click . In a famous default scrollview we will do RenderNode > Modifier > Surface http://jsbin.com/naviy/1/edit?js,output

http://stackoverflow.com/a/27529200

IjzerenHein commented 9 years ago

Hi, you can use the following options for that:

var scrollView = new FlexScrollView({
  layoutOptions: {
    itemSize: true // this causes the size from the renderable to be used (it calls getSize)
  }
  alwaysLayout: true // this ensures that the getSize function on the renderable is called every render-cycle
});

Also have a look at: #69

Let me know whether that solves the problem for you. Cheers.

kakajansh commented 9 years ago

Yes, thank you. Great! It solves my problem. Actually I found it yesterday just after writing this issue, I was curious if there is other way to do it in famous-flex.