Skip to content

Commit

Permalink
output width and height
Browse files Browse the repository at this point in the history
  • Loading branch information
stereobooster committed Apr 9, 2024
1 parent 80d058d commit 3b9293d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions fixtures/lastfm/expected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions fixtures/medical/expected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions fixtures/simple/expected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 3 additions & 7 deletions src/venn-isomorphic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,13 @@ async function renderDiagrams({
d3.select(`#${id}`).datum(diagram).call(chart)

const [element] = root.getElementsByTagName('svg')
const { height, width } = element.viewBox.baseVal

// Xif (screenshot) {
// document.body.append(root)
// }
const { height, width } = element

const result: RenderResult = {
height,
height: height.baseVal.value,
id,
svg: serializer.serializeToString(element),
width
width: width.baseVal.value
}

return result
Expand Down

0 comments on commit 3b9293d

Please sign in to comment.