How to use the ember-animated/motions/adjust-color.property function in ember-animated

To help you get started, we’ve selected a few ember-animated examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cardstack / portfolio / packages / common / addon / components / moving-inner-box.js View on Github external
sentSprites.forEach(sprite => {

      // Caution! This is a hack. It just happens to be safe in this situation
      // because we're messing with only the children of sentSprites, which will
      // all get destroyed at the end of animation regardless.
      [...sprite.element.children].forEach(element => {
        element.classList.add('ember-animated-hidden');
      });

      sprite.applyStyles({ 'z-index': 1 });
      move(sprite);
      resize(sprite);
      adjustColor.property('background-color')(sprite);
    });
  }
github ember-animation / ember-animated / tests / dummy / app / controllers / demos / color-and-shadow.js View on Github external
import Controller from '@ember/controller';
import adjustColor from 'ember-animated/motions/adjust-color';
import boxShadow from 'ember-animated/motions/box-shadow';

const backgroundColor = adjustColor.property('background-color');

export default class extends Controller {
  *transition({ receivedSprites }) {
    receivedSprites.forEach(backgroundColor);
    receivedSprites.forEach(boxShadow);
  }
}
github ember-animation / ember-animated / docs / app / pods / components / moving-word / component.js View on Github external
motions() {
    let motions = [];
    if (!this.disableMove) {
      motions.push(move);
    }
    if (!this.disableCompensateForScale) {
      motions.push(compensateForScale);
    }
    if (!this.disableAdjustFontSize) {
      motions.push(adjustCSS.property('font-size'));
    }
    if (!this.disableAdjustLetterSpacing) {
      motions.push(adjustCSS.property('letter-spacing'));
    }
    if (!this.disableAdjustColor) {
      motions.push(adjustColor.property('color'));
    }
    return motions;
  },
github ef4 / living-animation / src / ui / components / moving-word / component.js View on Github external
transition: function * ({ sentSprites }) {
    sentSprites.forEach(
      parallel(
        move,
        compensateForScale,
        adjustCSS.property('font-size'),
        adjustCSS.property('letter-spacing'),
        adjustColor.property('color')
      )
    );
  }
}).reopenClass({