Skip to content

Commit

Permalink
Apply scale to width as well
Browse files Browse the repository at this point in the history
  • Loading branch information
HorusGoul committed Dec 23, 2024
1 parent 168b024 commit b0cb24b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/pwa/src/components/periodic-table/PeriodicTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ function PeriodicTable({ elementRenderer, className }: PeriodicTableProps) {
const y = relY / scale - lightSize / 2;

if (lightRef.current && lightContainerRef.current) {
lightContainerRef.current.style.width = tableRect.width + "px";
lightContainerRef.current.style.height = tableRect.height + "px";
lightContainerRef.current.style.width = tableRect.width / scale + "px";
lightContainerRef.current.style.height = tableRect.height / scale + "px";
lightRef.current.style.left = x + "px";
lightRef.current.style.top = y + "px";
}
Expand Down

0 comments on commit b0cb24b

Please sign in to comment.