Skip to content

Commit

Permalink
v0.1.1 Change to use scale as animation
Browse files Browse the repository at this point in the history
  • Loading branch information
RoCky Wu committed Jun 5, 2016
1 parent e99bf97 commit 9166f52
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions demo/react-ripples.js
Original file line number Diff line number Diff line change
Expand Up @@ -8419,13 +8419,12 @@ return /******/ (function(modules) { // webpackBootstrap
});

setTimeout(function () {
var size = Math.max(offsetWidth, offsetHeight) * 3;
var size = Math.max(offsetWidth, offsetHeight);

_this.setState({
rippleStyle: {
width: size,
height: size,
left: 0, top: 0,
left: left, top: top,
transform: rippleStyle.transform + ' scale(' + size / 9 + ')',
opacity: 0,
transition: 'all ' + during + 'ms'
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-ripples",
"version": "0.1.0",
"version": "0.1.1",
"description": "The ripple effect everything",
"main": "dist/react-ripples.js",
"scripts": {
Expand Down
7 changes: 3 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ class Ripples extends React.Component {
})

setTimeout(()=> {
const size = Math.max(offsetWidth, offsetHeight) * 3
const size = Math.max(offsetWidth, offsetHeight)

this.setState({
rippleStyle: {
width: size,
height: size,
left: 0, top: 0,
left, top,
transform: `${rippleStyle.transform} scale(${size/9})`,
opacity: 0,
transition: `all ${during}ms`,
}
Expand Down

0 comments on commit 9166f52

Please sign in to comment.