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

Flexible Layout #183

Closed Miggz closed 9 years ago

Miggz commented 10 years ago

I am trying to implement a flexible-layout. The documentation does not show a full example, except to show:

<fa-flexible-layout fa-options="scopeOptionsObject">
</fa-flexible-layout>

Do I just add layout elements within the fa-flexible-layout element?

For example:

<fa-flexible-layout fa-options="scopeOptionsObject">
   <fa-surface>Content</fa-surface>
   <fa-surface>Content</fa-surface>
</fa-flexible-layout>

I have added options in my controller, but it doesn't seem to be working. Any help would be most appreciated. Also, I apologize if this is a stupid question, I'm more of a designer than a programmer.

Thanks

steveblue commented 10 years ago

You may need to wrap those surfaces in <fa-view> . This is untested on my end, but some layouts prefer sequencing views rather than surfaces.

Nytrm commented 10 years ago

Wrapping a fa-view inside the sequential layout works for me.

<fa-sequential-layout fa-options="sequentialOptions">
    <fa-view fa-size="[160,50]">
        <fa-modifier fa-translate="[0,0,1]">
            <fa-surface>Surface One</fa-surface>
        </fa-modifier>
    </fa-view>
    <fa-view fa-size="[160,50]">
        <fa-modifier fa-translate="[0,0,1]">
            <fa-surface>Surface Two</fa-surface>
        </fa-modifier>
    </fa-view>
</fa-sequential-layout>
jordanpapaleo commented 9 years ago

@Miggz Is this still a valid issue? Thanks - Jordan