mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
parent
facde7ace0
commit
566e6a5ede
24 changed files with 912 additions and 357 deletions
|
@ -44,7 +44,7 @@ export const hitTest = (
|
|||
y: number,
|
||||
): boolean => {
|
||||
// How many pixels off the shape boundary we still consider a hit
|
||||
const threshold = 10 / appState.zoom;
|
||||
const threshold = 10 / appState.zoom.value;
|
||||
const point: Point = [x, y];
|
||||
|
||||
if (isElementSelected(appState, element)) {
|
||||
|
@ -60,7 +60,7 @@ export const isHittingElementBoundingBoxWithoutHittingElement = (
|
|||
x: number,
|
||||
y: number,
|
||||
): boolean => {
|
||||
const threshold = 10 / appState.zoom;
|
||||
const threshold = 10 / appState.zoom.value;
|
||||
|
||||
return (
|
||||
!isHittingElementNotConsideringBoundingBox(element, appState, [x, y]) &&
|
||||
|
@ -73,7 +73,7 @@ const isHittingElementNotConsideringBoundingBox = (
|
|||
appState: AppState,
|
||||
point: Point,
|
||||
): boolean => {
|
||||
const threshold = 10 / appState.zoom;
|
||||
const threshold = 10 / appState.zoom.value;
|
||||
|
||||
const check =
|
||||
element.type === "text"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue