Update Hyperlink.tsx

This commit is contained in:
zsviczian 2022-02-09 11:53:08 +01:00 committed by GitHub
parent c020b4d6b3
commit 95161b05e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,11 +296,8 @@ export const getLinkHandleFromCoords = (
const linkMarginY = size / appState.zoom.value;
const centerX = (x1 + x2) / 2;
const centerY = (y1 + y2) / 2;
const centeringOffset =
(size - 8) / (2 * appState.zoom.value) +
size / appState.zoom.value -
linkWidth;
const dashedLineMargin = 4 / appState.zoom.value;
const centeringOffset = (size - 8) / (2 * sizeZoom);
const dashedLineMargin = 4 / sizeZoom;
// Same as `ne` resize handle
const x = x2 + dashedLineMargin - centeringOffset;