Skip to content

Commit

Permalink
feat: to can be relative number
Browse files Browse the repository at this point in the history
  • Loading branch information
aadityataparia committed May 30, 2019
1 parent d76eb65 commit 5732237
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 25 deletions.
15 changes: 12 additions & 3 deletions README.md
Expand Up @@ -16,8 +16,8 @@ This is a basic level library, which can be used to create complex animations as

## Size

| Type | Size |
| :------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| Type | Size |
| :----------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| Normal (`dist/sifrr.animate.js`) | [![Normal](https://img.badgesize.io/sifrr/sifrr-animate/master/dist/sifrr.animate.js?maxAge=600)](https://github.com/sifrr/sifrr-animate/blob/master/dist/sifrr.animate.js) |
| Minified (`dist/sifrr.animate.min.js`) | [![Minified](https://img.badgesize.io/sifrr/sifrr-animate/master/dist/sifrr.animate.min.js?maxAge=600)](https://github.com/sifrr/sifrr-animate/blob/master/dist/sifrr.animate.min.js) |
| Minified + Gzipped (`dist/sifrr.animate.min.js`) | [![Minified + Gzipped](https://img.badgesize.io/sifrr/sifrr-animate/master/dist/sifrr.animate.min.js?compression=gzip&maxAge=600)](https://github.com/sifrr/sifrr-animate/blob/master/dist/sifrr.animate.min.js) |
Expand Down Expand Up @@ -78,7 +78,7 @@ animate({ type: 'customType' ...})

### Format

Property's current/from value and to value should be of same format (strings around numbers should de same).
Property's current/from value and to value should be of same format (strings around numbers should be same).

- Number
- string with multiple numbers to animate, examples:
Expand All @@ -88,6 +88,15 @@ Property's current/from value and to value should be of same format (strings aro
- 'abcd 1234 fed 45'
- 'aaaaaa123aaaa123aaaaaa123aaaaaa'

`OR`

Relative `to`, `to` can be relative number as well

- if from is `100px`, and to is `+=20`, then final value will be `120px`
- if from is `100px`, and to is `-=20`, then final value will be `80px`
- if from is `100px`, and to is `*=2`, then final value will be `200px`
- if from is `100px`, and to is `/=5`, then final value will be `20px`

## Standalone files

```html
Expand Down
30 changes: 25 additions & 5 deletions dist/sifrr.animate.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/sifrr.animate.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sifrr.animate.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 25 additions & 5 deletions dist/sifrr.animate.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5732237

Please sign in to comment.