Add scrollX/Y for components not wrapped in App

old
Shant Parseghian 2015-11-17 11:39:26 -08:00
parent 1dbf7fa3c1
commit 2bf510f42e
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
};
}