We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HI. How can I use ReactSVGPanZoom onclick get the ID and NAME of SVG polygon rect.
The text was updated successfully, but these errors were encountered:
Hi, try this, it worked for me
<ReactSVGPanZoom ref={Viewer} onClick={(e) => { const point = e.point; const target = e.originalEvent.target; const id = target.id; const tagName = target.tagName; console.log("Click:", tagName, id ); console.log("Point", point); Viewer.current.setPointOnViewerCenter(point.x, point.y, 10); }} > <svg width={width || 0} height={height || 0} > {content} </svg> </ReactSVGPanZoom>
Sorry, something went wrong.
No branches or pull requests
HI. How can I use ReactSVGPanZoom onclick get the ID and NAME of SVG polygon rect.
The text was updated successfully, but these errors were encountered: