feat: add approximate elements in bbox detection (#6727)

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Are 2023-10-26 23:33:00 +02:00 committed by GitHub
parent dcf4592e79
commit d5e3f436dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 597 additions and 153 deletions

View file

@ -13,6 +13,7 @@ import {
MaybeTransformHandleType,
} from "./transformHandles";
import { AppState, Zoom } from "../types";
import { Bounds } from "./bounds";
const isInsideTransformHandle = (
transformHandle: TransformHandle,
@ -87,7 +88,7 @@ export const getElementWithTransformHandleType = (
};
export const getTransformHandleTypeFromCoords = (
[x1, y1, x2, y2]: readonly [number, number, number, number],
[x1, y1, x2, y2]: Bounds,
scenePointerX: number,
scenePointerY: number,
zoom: Zoom,