react-hammerjs
react-hammerjs copied to clipboard
The Pinch event can't work
trafficstars
Here is my code:
render () {
return (
<div className="mapBox">
<Hammer component="div"
onPinch = { this.pinchHandler.bind(this) }
onRotate={ this.rotateHandler.bind(this) }
options={ options }>
<div id="svgMap" className="svg-map" style={ stype } ref="svgMap"></div>
</Hammer>
</div>
)
}
but the pinchHandler and the rotateHandler don't run
is there have some question ?
+1 have the same issue! update:
by default: Pinch- and RotateRecognizers are disabled, dunno why...
to enable it just append the following options to your Hammer element:
options={{
recognizers:{
pinch : { enable:true }
}
}}
+1 thanks for sharing, that worked great
Any chance someone would mind submitting a PR to update the readme with this info?