Skip to content

Commit

Permalink
fix(hiccup-svg): update points(), use centered rects
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jul 10, 2019
1 parent 6c64b88 commit c7d6aaa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/hiccup-svg/src/points.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export const points = (
{ opacity: 0 },
shape === "circle"
? ["circle", { id: href, cx: 0, cy: 0, r: r }]
: ["rect", { id: href, x: 0, y: 0, width: r, height: r }]
: [
"rect",
{ id: href, x: -r / 2, y: -r / 2, width: r, height: r }
]
]);
href = "#" + href;
} else {
Expand Down

0 comments on commit c7d6aaa

Please sign in to comment.