Skip to content

Commit

Permalink
Fix for #133 (or for other reported zooming bug). Header height short…
Browse files Browse the repository at this point in the history
… circuit when resizing the svg needs to check the changed header id.
  • Loading branch information
josephlacey committed Apr 16, 2024
1 parent 5dc0b6b commit bb604b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/util/dimensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export function zoomForScale(scale: number): number {

export function calculateSvgHeight(): number {
const containerHeight = getElementById("oligrapher-container").clientHeight
const headerHeight = document.getElementById("oligrapher-header")?.clientHeight || 0
const headerHeight =
document.getElementById("oligrapher-header")?.clientHeight ||
document.getElementById("oligrapher-header-condensed")?.clientHeight
const svgHeight = containerHeight - headerHeight - 1
return svgHeight
}

0 comments on commit bb604b1

Please sign in to comment.