Search code examples
polymerpolymer-1.0paper-elements

how and when to set animationConfig on a paper-dialog


I have a paper-dialog inside of another element looking like:

<paper-dialog id="modal" modal>
  <h2>Login</h2>
  <p>Lorem......</p>

  <div class="buttons">
    <paper-button dialog-confirm autofocus>Login</paper-button>
  </div>
</paper-dialog>

I could declaratively add entry-animation and exit-animation but I'm really trying to do two effects at once like it shows in the docs

I tried using something like:

this.$.modal.animationConfig = {....}; //like the docs

and I set node to this.$.modal, but I'm pretty certain it doesn't read that variable at all because when I check this.$.modal.getAnimationConfig('exit') (or entry) I get nothing.

So where in the lifecycle can I do something like this.

The end goal for me is to apply to intertwined (one of them slightly delayed) animations to my paper-dialog on entry and exit like in (as he loves to be called :p ) "Bob Dod"'s polycast

If you don't know the answer, pointing me in a different direction also helps ;)


Solution

  • Since it seems my comment was helpful, here it is as an answer:

    "Are you sure about this? I tried setting the animationConfig as this.$.modal.animationConfig = { ... } in this fiddle and everything worked just fine..."