mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Bump roughjs and resolve breaking change in roughjs refactoring… (#1463)
* Fix for roughjs refactoring curve-estinmation code into a separate package * Update jest transformIgnorePatterns
This commit is contained in:
parent
9b7a743e8b
commit
9ac79061fa
3 changed files with 32 additions and 7 deletions
|
@ -4,7 +4,7 @@ import {
|
|||
rotate,
|
||||
isPointInPolygon,
|
||||
} from "../math";
|
||||
import { getPointsOnBezierCurves } from "roughjs/bin/geometry";
|
||||
import { pointsOnBezierCurves } from "points-on-curve";
|
||||
|
||||
import { NonDeletedExcalidrawElement } from "./types";
|
||||
|
||||
|
@ -266,7 +266,7 @@ const hitTestCurveInside = (
|
|||
}
|
||||
}
|
||||
if (points.length >= 4) {
|
||||
const polygonPoints = getPointsOnBezierCurves(points as any, 50);
|
||||
const polygonPoints = pointsOnBezierCurves(points as any, 10, 5);
|
||||
return isPointInPolygon(polygonPoints, x, y);
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue