Skip to content

Commit

Permalink
fix(ui): make PNG export independent of browser zoom setting
Browse files Browse the repository at this point in the history
  • Loading branch information
a-asaad committed Sep 6, 2024
1 parent 049fa5a commit 2d37b9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/src/components/options-menu/ExportPng.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { forwardRef } from "react"
import { getNodesBounds, getViewportForBounds } from "reactflow"
import { useAppActions, useGetNodes } from "../../singletons/store"

const SCALING_FACTOR = 1.20
const SCALING_FACTOR = 1.5

const downloadImage = (dataUrl: string) => {
const a = document.createElement("a")
Expand Down Expand Up @@ -42,6 +42,7 @@ const ExportPng = forwardRef<HTMLElement>(
backgroundColor: layer01,
width: imageWidth,
height: imageHeight,
pixelRatio: 1,
style: {
width: imageWidth.toString(),
height: imageHeight.toString(),
Expand Down

0 comments on commit 2d37b9b

Please sign in to comment.