Skip to content

Commit

Permalink
fix(frontend): broken zoom: property in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
kris7t committed May 26, 2024
1 parent 7b95c81 commit cb9eea3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion subprojects/frontend/src/graph/ZoomCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export type FitZoomCallback = ((newSize?: {
}) => void) &
((newSize: boolean) => void);

const useZoom = 'zoom' in document.body.style;
// `zoom: reset;` is specific to WebKit (but not Blink).
// `transform: scale();` makes zooming in on WebKit blurry,
// but we should prefer it for Blink for performance reasons
// and also for Gecko, where `zoom:` is broken for zooming in SVG.
const useZoom = CSS.supports('zoom: reset');

export default function ZoomCanvas({
children,
Expand Down

0 comments on commit cb9eea3

Please sign in to comment.