aonawale / ember-material-components

Google's Material Design Components for Ember JS apps
https://aonawale.github.io/ember-material-components
MIT License
2 stars 1 forks source link

Toolbar fixedAdjustElement on interval #2

Closed MrChriZ closed 6 years ago

MrChriZ commented 6 years ago

Is it possible we could have the option to have fixedAdjustElement on an interval timer as in the following example: https://material-components-web.appspot.com/toolbar/waterfall-flexible-toolbar-custom-style.html

The waterfall/flexible toolbar doesn't seem to work correctly without it.

MrChriZ commented 6 years ago

I've created an Ember Twiddle here using this add on: https://ember-twiddle.com/3d4da37545945170aee6016bdd539892

At present when isFixed, and isFlexible are in play things seem to break.

MrChriZ commented 6 years ago

I might be misunderstanding this... I might just need to pass in values for contentElement... however I'm not sure how to do this.

MrChriZ commented 6 years ago

For the time being I've worked around this by creating a toolbar-extension component: https://ember-twiddle.com/78bb807277b50460cc8eda1161417983

I'm not sure if this is a good way of doing it but it seems to work. I'm still relatively new to Ember.

MrChriZ commented 6 years ago

I've massively over complicated this one... all I needed to do was use contentSelector {{#mdc-toolbar isWaterfall=false isFixed=true isLastRowFixed=true isFlexible=true class="portfolio-navigation-row portfolio-header" contentSelector=".mdc-toolbar-fixed-adjust"}}

All working now.

Overall this library is amazing!