The SVG 1.1 DOM has just the right method (unfortunately it’s not yet implemented in mozilla):
var nodelist = svgroot.getIntersectionList(hitrect, null);
For a full working example see here.
More Related Contents:
- How to access SVG elements with Javascript
- Create SVG tag with JavaScript
- Scaling d3 v4 map to fit SVG (or at all)
- HTML5 Canvas vs. SVG vs. div
- Replacing d3.transform in D3 v4
- How do I include newlines in labels in D3 charts?
- JavaScript accessing inner DOM of SVG
- Firefox error rendering an SVG image to HTML5 canvas with drawImage
- Add SVG element to existing SVG using DOM
- JavaScript createElementNS and SVG
- In d3, how to get the interpolated line data from a SVG line?
- D3js take data from an array instead of a file
- How to access the content of the “embed” tag in HTML
- D3 fill shape with image using pattern
- Is it possible to use HTML’s .querySelector() to select by xlink attribute in an SVG?
- Is it possible to append a div inside an SVG element? [duplicate]
- Baking transforms into SVG Path Element commands
- Embedding SVG in PDF (exporting SVG to PDF using JS)
- svg / d3.js rounded corners on one side of a rectangle
- How do I return y coordinate of a path in d3.js?
- Scripting data in SVG (reading and modifying)
- How can I calculate the area of a bezier curve?
- SVG donut slice as path element (annular sector)
- Animate marquee on SVG curve
- SVG get text element width
- Programmatically creating an SVG image element with javascript
- Does the attr() in jQuery force lowercase?
- Calculate SVG Path Centroid with D3.js
- How do I dynamically insert an SVG image into HTML?
- How do I manipulate the SVG DOM and create elements?