feat: transparent link background, scale link icon when zooming to below 100% (#9520)

* Do not set link background color, dynamically scale down link icon size with zoom.

* removed unnecessary change

* use canvas bg color & reduce size and stroke width

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
zsviczian
2025-05-14 13:38:18 +02:00
committed by GitHub
co-authored by dwelle
parent 4dfb8a3f8e
commit f7dcc893ea
3 changed files with 10 additions and 11 deletions
+1 -1
View File
@@ -188,7 +188,7 @@ const renderLinkIcon = (
window.devicePixelRatio * appState.zoom.value,
window.devicePixelRatio * appState.zoom.value,
);
linkCanvasCacheContext.fillStyle = "#fff";
linkCanvasCacheContext.fillStyle = appState.viewBackgroundColor || "#fff";
linkCanvasCacheContext.fillRect(0, 0, width, height);
if (canvasKey === "elementLink") {