#7255 tangentialArc: angle, radius point-and-click support (#7449)

* separate handling of tangentialArc with angle and radius args

* make previousEndTangent available in segment input for handling tangentialArc with angle/radius

* start adding support for editing tangentialArc with angle, radius

* draw tangentialArc sketch when using angle, radius

* fix getTanPreviousPoint when using tangentialArc with angle, radius

* fix case of unwanted negative angles when calculating angle for tangentialArc

* lint

* add test for tangentialArc dragging with andle, radius

* lint, fmt

* fix getArgForEnd for tangentialArc with radius, angle

* renaming vars
This commit is contained in:
Andrew Varga
2025-06-17 11:29:21 +02:00
committed by GitHub
parent acb43fc82c
commit 832bf77c92
7 changed files with 219 additions and 33 deletions

View File

@ -55,6 +55,12 @@ export function isArray(val: any): val is unknown[] {
return Array.isArray(val)
}
export function areArraysEqual<T>(a: T[], b: T[]): boolean {
if (a.length !== b.length) return false
const set1 = new Set(a)
return b.every((element) => set1.has(element))
}
export type SafeArray<T> = Omit<Array<T>, number> & {
[index: number]: T | undefined
}