From 19315a91595612f270508274fa012d066e933f39 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Tue, 31 Mar 2026 11:16:57 -0700 Subject: [PATCH] default zero offset in windowless environments --- src/style.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/style.js b/src/style.js index 3ab2105861..b839843ae7 100644 --- a/src/style.js +++ b/src/style.js @@ -6,7 +6,7 @@ import {isNone, isNoneish, isRound, maybeColorChannel, maybeNumberChannel} from import {keyof, number, string} from "./options.js"; import {warn} from "./warnings.js"; -export let offset = typeof window === "undefined" || window.devicePixelRatio > 1 ? 0 : 0.5; +export let offset = typeof window !== "undefined" && !(window.devicePixelRatio > 1) ? 0.5 : 0; export function setOffset(o) { offset = o;