Merge pull request #123 from shantp/master

Add scrollX/Y for components not wrapped in App
old
Javi Velasco 2015-11-18 10:01:42 +01:00
commit 1329cf94e4
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ class Ripple extends React.Component {
_getDescriptor (pageX, pageY) {
const { left, top, height, width } = ReactDOM.findDOMNode(this).getBoundingClientRect();
return {
left: this.props.centered ? width / 2 : pageX - left,
top: this.props.centered ? height / 2 : pageY - top,
left: this.props.centered ? width / 2 : pageX - left + window.scrollX,
top: this.props.centered ? height / 2 : pageY - top + window.scrollY,
width: width * this.props.spread
};
}