Fix map display and zoom issues

-   Reduced region label size.
-   Restored connections.
-   Inverted zoom direction.
This commit is contained in:
gpt-engineer-app[bot]
2025-06-14 00:50:43 +00:00
parent ce53ca5977
commit dd1fe9532d
3 changed files with 12 additions and 12 deletions

View File

@@ -104,8 +104,8 @@ export const RegionMap: React.FC<{ regionName: string }> = ({ regionName }) => {
const mouseX = e.clientX - rect.left;
const mouseY = e.clientY - rect.top;
// Reverse scroll direction: positive deltaY zooms out, negative zooms in
const scale = e.deltaY > 0 ? 1.1 : 0.9;
// Invert scroll direction: negative deltaY (scroll up) zooms out, positive (scroll down) zooms in
const scale = e.deltaY < 0 ? 1.1 : 0.9;
const newWidth = viewBox.width * scale;
const newHeight = viewBox.height * scale;
@@ -113,7 +113,7 @@ export const RegionMap: React.FC<{ regionName: string }> = ({ regionName }) => {
const mouseYInSVG = viewBox.y + (mouseY / rect.height) * viewBox.height;
const newX = mouseXInSVG - (mouseX / rect.width) * newWidth;
const newY = mouseYInSVG - (mouseY / rect.height) * newWidth;
const newY = mouseYInSVG - (mouseY / rect.height) * newHeight;
setViewBox({
x: newX,