Skip to content

Commit

Permalink
Merge pull request #131 from Architrixs/main
Browse files Browse the repository at this point in the history
add check for line
  • Loading branch information
rsimon authored Jul 18, 2022
2 parents ff94786 + ee3d61f commit ba106e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/AnnotationStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ const pointInSVGShape = (x, y, annotation) => {
} else if (nodeName === 'path') {
const polygons = svgPathToPolygons(svg);
return polygons.find(polygon => pointInPolygon(pt, polygon));
} else if (nodeName === 'line') {
return true;
} else {
throw `Unsupported SVG shape type: ${nodeName}`;
}
Expand Down

0 comments on commit ba106e2

Please sign in to comment.