diff --git a/lib/Ripple.js b/lib/Ripple.js index 1afa283..3d955c9 100644 --- a/lib/Ripple.js +++ b/lib/Ripple.js @@ -23,6 +23,7 @@ export default class Ripple extends Component { return ( - + {children} ); } + _setMainRef = (ref) => { + this.main = ref; + }; + + // Proxy the measurement methods from the main view + measure = (...args) => this.main.measure(...args); + measureInWindow = (...args) => this.main.measureInWindow(...args); + measureLayout = (...args) => this.main.measureLayout(...args); } diff --git a/lib/polyfill/Ripple.js b/lib/polyfill/Ripple.js index 4e41e9c..93331f9 100644 --- a/lib/polyfill/Ripple.js +++ b/lib/polyfill/Ripple.js @@ -71,6 +71,7 @@ export default class Ripple extends Component { onPressOut={this._unHighlight} > @@ -168,6 +169,14 @@ export default class Ripple extends Component { }) }; + _setMainRef = (ref) => { + this.main = ref; + }; + + // Proxy the measurement methods from the main view + measure = (...args) => this.main.measure(...args); + measureInWindow = (...args) => this.main.measureInWindow(...args); + measureLayout = (...args) => this.main.measureLayout(...args); } const styles = {