Compare commits
5 Commits
master
...
zsviczian-
Author | SHA1 | Date | |
---|---|---|---|
|
65c4720240 | ||
|
95161b05e4 | ||
|
c020b4d6b3 | ||
|
7cb1def60c | ||
|
3a8408317e |
@ -290,13 +290,14 @@ export const getLinkHandleFromCoords = (
|
|||||||
appState: AppState,
|
appState: AppState,
|
||||||
): [x: number, y: number, width: number, height: number] => {
|
): [x: number, y: number, width: number, height: number] => {
|
||||||
const size = DEFAULT_LINK_SIZE;
|
const size = DEFAULT_LINK_SIZE;
|
||||||
const linkWidth = size / appState.zoom.value;
|
const zoom = appState.zoom.value > 1 ? appState.zoom.value : 1;
|
||||||
const linkHeight = size / appState.zoom.value;
|
const linkWidth = size / zoom;
|
||||||
const linkMarginY = size / appState.zoom.value;
|
const linkHeight = size / zoom;
|
||||||
|
const linkMarginY = size / zoom;
|
||||||
const centerX = (x1 + x2) / 2;
|
const centerX = (x1 + x2) / 2;
|
||||||
const centerY = (y1 + y2) / 2;
|
const centerY = (y1 + y2) / 2;
|
||||||
const centeringOffset = (size - 8) / (2 * appState.zoom.value);
|
const centeringOffset = (size - 8) / (2 * zoom);
|
||||||
const dashedLineMargin = 4 / appState.zoom.value;
|
const dashedLineMargin = 4 / zoom;
|
||||||
|
|
||||||
// Same as `ne` resize handle
|
// Same as `ne` resize handle
|
||||||
const x = x2 + dashedLineMargin - centeringOffset;
|
const x = x2 + dashedLineMargin - centeringOffset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user