Famous / famous-angular

Bring structure to your Famo.us apps with the power of AngularJS. Famo.us/Angular integrates seamlessly with existing Angular and Famo.us apps.
https://famo.us/angular
Mozilla Public License 2.0
1.92k stars 275 forks source link

fa-header-footer-layout #196

Closed bguiz closed 10 years ago

bguiz commented 10 years ago

Currently, the documentation recommends setting the dimensions of the child renderable nodes (surfaces or other views), over setting them in the options of fa-header-footer-layout itself.

I have found that the recommendation only works for a vertical layout, but not for a horizontal layout (direction:0 in options).

Not sure if the right fix is to update the documentation, or if there is a bug in faHeaderFooterLayout. I am, however, leaning towards updating the documentation, as this is how you would do it in raw Famo.us.

bguiz commented 10 years ago

Examples:

This works:

<fa-header-footer-layout
    fa-size="[0, 60]"
    fa-options="{ direction: 0, headerSize: 60, footerSize: 60 }">
    <fa-surface>
        Left
    </fa-surface>
    <fa-surface>
        Center
    </fa-surface>
    <fa-surface>
        Right
    </fa-surface>
</fa-header-footer-layout>

This does not work:

<fa-header-footer-layout
    fa-size="[0, 60]"
    fa-options="{ direction: 0 }">
    <fa-surface
        fa-size="[60, undefined]">
        Left
    </fa-surface>
    <fa-surface
        fa-size="[undefined, undefined]">
        Center
    </fa-surface>
    <fa-surface
        fa-size="[60, undefined]">
        Right
    </fa-surface>
</fa-header-footer-layout>
zackbrown commented 10 years ago

You're right; I believe the documentation is misleading in this case. Famo.us/Angular passes through directly to vanilla Famo.us as much as possible, and this case is no exception. The docs are generated from the code comments using ngdoc—I don't suppose you'd like to update the comments and PR? I can then update the docs build and publish to http://famo.us/angular.

bguiz commented 10 years ago

No problem, will update the docs and PR

On 4 September 2014 11:03, Zack Brown notifications@github.com wrote:

You're right; I believe the documentation is misleading in this case. Famo.us/Angular passes through directly to vanilla Famo.us as much as possible, and this case is no exception. The docs are generated from the code comments using ngdoc—I don't suppose you'd like to update the comments and PR? I can then update the docs build and publish to http://famo.us/angular.

— Reply to this email directly or view it on GitHub https://github.com/Famous/famous-angular/issues/196#issuecomment-54391005 .

zackbrown commented 10 years ago

awesome man, thank you!

bguiz commented 10 years ago

Closing issue, see PR instead: #197