Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with templates #4

Open
NicolasRannou opened this issue Feb 16, 2017 · 3 comments
Open

Use with templates #4

NicolasRannou opened this issue Feb 16, 2017 · 3 comments

Comments

@NicolasRannou
Copy link

Is there a good way to use this element with templates?
The animation is broken when I do the following. (the fab button just appear, no animation)

<paper-fab-speed-dial>      
    <paper-fab icon="add"></paper-fab>
    <div class="dropdown-content">
      <template is="dom-repeat" items="{{apps}}">
        <paper-fab mini id="[[item.name]]" icon="[[item.icon]]"></paper-fab>
        <paper-tooltip for="[[item.name]]" position="left" animation-delay="0">[[item.label]]</paper-tooltip>
       </template>
    </div>
</paper-fab-speed-dial>
@pomber
Copy link
Owner

pomber commented Feb 16, 2017

It's not working because the animation is configured before items are added:
https://github.com/pomber/paper-fab-speed-dial/blob/master/paper-fab-speed-dial.html#L69

We will need to find the way to update the animation config after children are added.
I will take a look later.

@pomber
Copy link
Owner

pomber commented Feb 16, 2017

Another demo:

<paper-fab-speed-dial class="three">
  <paper-fab></paper-fab>
  <div class="dropdown-content">
    <template is="dom-repeat" items="[1,2]">
      <paper-fab mini></paper-fab>
    </template>
  </div>
</paper-fab-speed-dial>

@bennypowers
Copy link
Collaborator

Is this still an issue after #8 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants