mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-14 13:00:09 +02:00
fix: More arrow fixes
This commit is contained in:
@@ -6,11 +6,11 @@ expect.extend({
|
||||
throw new Error("expected and received are not point arrays");
|
||||
}
|
||||
|
||||
const COMPARE = 1 / Math.pow(10, precision || 2);
|
||||
const COMPARE = 1 / precision === 0 ? 1 : Math.pow(10, precision ?? 2);
|
||||
const pass = expected.every(
|
||||
(point, idx) =>
|
||||
Math.abs(received[idx]?.[0] - point[0]) < COMPARE &&
|
||||
Math.abs(received[idx]?.[1] - point[1]) < COMPARE,
|
||||
Math.abs(received[idx][0] - point[0]) < COMPARE &&
|
||||
Math.abs(received[idx][1] - point[1]) < COMPARE,
|
||||
);
|
||||
|
||||
if (!pass) {
|
||||
|
Reference in New Issue
Block a user