Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

API addition: animation.attrKeyframes for element attributes #10

@clyfe

Description

@clyfe

It's a shame to have to write all that code [1] to make a custom animation just to animate scrollTop.
How about having an array of hashes similar animation.keyframes but instead css attributes, it would have element attributes like scrollTop, and it would yield a customEffect function:

var animation = new CoreAnimation();
animation.duration = 500;
animation.target = document.getElementById('el');
animation.attrKeyframes = [
  {scrollTop: animation.target.scrollTop},
  {scrollTop: 500}
];
animation.play();

[1] http://stackoverflow.com/a/26852482/283608

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions