|
|
|
@ -1,7 +1,5 @@
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { createElement, Component } from 'react';
|
|
|
|
|
import { findDOMNode } from 'react-dom';
|
|
|
|
|
import isCssAnimationSupported from '../_util/isCssAnimationSupported';
|
|
|
|
|
import assign from 'object-assign';
|
|
|
|
|
import omit from 'omit.js';
|
|
|
|
|
|
|
|
|
@ -40,12 +38,6 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
if (!isCssAnimationSupported()) {
|
|
|
|
|
findDOMNode(this).className += ' not-support-css-animation';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getPositionByNum(num, i) {
|
|
|
|
|
if (this.state.animateStarted) {
|
|
|
|
|
return 10 + num;
|
|
|
|
@ -109,6 +101,7 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
|
|
|
|
|
className: `${this.props.prefixCls}-only`,
|
|
|
|
|
style: {
|
|
|
|
|
transition: removeTransition && 'none',
|
|
|
|
|
msTransform: `translateY(${-position * 100}%)`,
|
|
|
|
|
WebkitTransform: `translateY(${-position * 100}%)`,
|
|
|
|
|
transform: `translateY(${-position * 100}%)`,
|
|
|
|
|
},
|
|
|
|
|