IjzerenHein / famous-flex

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

ResolveConfigSize doesn't resolve size for Surfaces without a size #100

Closed ManuelOverdijk closed 9 years ago

ManuelOverdijk commented 9 years ago

Hey Hein,

As per commit aa4649e494d9fa6238f4ae2f9d22d322f5079d1e, _resolveConfigSize(renderNode) returns configSize.size = null for Surfaces without an explicitly defined size. This results in an Cannot read property '0' of null as configSize.size is not defined.

For instance, breaking the current NavBarLayout example code:

dataSource: {
    background: new Surface({properties: {backgroundColor: 'black'}}),
    title: new Surface({content: 'My title'}),
   ...

For anyone encountering the same issue, just a small workaround:

dataSource: {
    background: new Surface({properties: {backgroundColor: 'black'}}),
    title: new Surface({content: 'My title', size:[true, true]}),
   ...
IjzerenHein commented 9 years ago

Ah, thanks for the heads up Manuel!

I'll let you know when this is fixed!

IjzerenHein commented 9 years ago

Alright, has been fixed. Thanks!