LivelyKernel / lively.morphic

An implementation of the Morphic user interface framework for lively.next.
13 stars 2 forks source link

using Promises for animations #93

Closed rksm closed 7 years ago

rksm commented 7 years ago

@merryman

Currently we have code like this around:

    this.animate({opacity: 0, onFinish: () => {
      cb(this);
      this.remove()
    }});

Can you refactor the animations to use promises? This should make for a much nicer interface.

    await this.animate({opacity: 0});
    this.remove();

or

    return this.animate({opacity: 0}).then(() => {
      this.remove()
    }});
merryman commented 7 years ago

This is now supported: 16acb28232e12f4df197e6beed100c5ba3e71568