Skip to content

Commit

Permalink
PB-486: Remove header heihgt from the print area calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed May 15, 2024
1 parent f3421a0 commit 2f29ff9
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default function usePrintAreaRenderer(map) {
const mapWidth = computed(() => store.state.ui.width)
// Same here for simplicity we take the screen size minus the header size for the map size
const mapHeight = computed(() => store.state.ui.height - store.state.ui.headerHeight)
const headerHeight = computed(() => store.state.ui.headerHeight)

watch(isActive, (newValue) => {
if (newValue) {
Expand Down Expand Up @@ -96,11 +95,9 @@ export default function usePrintAreaRenderer(map) {
]

const minx = center[0] - w / 2
// here we move the center down due to the header that overlap the map
const miny = center[1] - h / 2 + headerHeight.value
const miny = center[1] - h / 2
const maxx = center[0] + w / 2
// here we move the center down due to the header that overlap the map
const maxy = center[1] + h / 2 + headerHeight.value
const maxy = center[1] + h / 2
return [minx, miny, maxx, maxy]
}

Expand Down

0 comments on commit 2f29ff9

Please sign in to comment.