diff options
author | alyssaf16 <alyssa_feinberg@brown.edu> | 2025-01-13 17:25:40 -0500 |
---|---|---|
committer | alyssaf16 <alyssa_feinberg@brown.edu> | 2025-01-13 17:25:40 -0500 |
commit | 22daafa9c505eb9bffb8604be0924a7450d20113 (patch) | |
tree | 30a77425f3bb989e3e100366660c86342f1bf67c /src/ClientUtils.ts | |
parent | 9e3ca3743437396a16b3e3f402e76336b056d6b7 (diff) | |
parent | 10a89be0b184df2750a4b3eceb48db205cb83e95 (diff) |
Merge branch 'master' into alyssa-agent
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r-- | src/ClientUtils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ClientUtils.ts b/src/ClientUtils.ts index baad9a06c..8f62b9060 100644 --- a/src/ClientUtils.ts +++ b/src/ClientUtils.ts @@ -165,7 +165,7 @@ export namespace ClientUtils { return { scale: 0, translateX: 1, translateY: 1 }; } const rect = ele.getBoundingClientRect(); - const scale = ele.offsetWidth === 0 && rect.width === 0 ? 1 : rect.width / ele.offsetWidth; + const scale = ele.offsetWidth === 0 && rect.width === 0 ? 1 : rect.width / (ele.offsetWidth || 1); const translateX = rect.left; const translateY = rect.top; |