Skip to content

Commit

Permalink
fix(hiccup-svg): update convert() image (new arg order in hdom-canvas)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 27, 2019
1 parent 3774bfb commit b206cff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/hiccup-svg/src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const convertTree =
case "text":
return text(tree[2], tree[3], attribs);
case "img":
return image(tree[2], tree[3].src, attribs);
return image(tree[3], tree[2].src, attribs);
case "points":
return points(tree[2], attribs.shape, attribs.size, attribs);
default:
Expand Down
3 changes: 2 additions & 1 deletion packages/hiccup-svg/src/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const image =
...attribs,
// TODO replace w/ SVG2 `href` once Safari supports it
"xlink:href": url,
x: ff(pos[0]), y: ff(pos[1]),
x: ff(pos[0]),
y: ff(pos[1]),
})
];

0 comments on commit b206cff

Please sign in to comment.