[BUG] circle and threePointArc and other overlay fixes (#6409)

* fix length constrainting

* conflicet

* fix circle center constraints

* fix up circle remove constraints more and add test

* fix three point arc overlays and add test for it

* fixes

* console log

* fix tangential arc stuff

* fmt

* fix unit test

* fix console error when selectiong arc
This commit is contained in:
Kurt Hutten
2025-04-30 12:08:45 +10:00
committed by GitHub
parent 0ea0d1703e
commit bf63b21d74
13 changed files with 877 additions and 190 deletions

View File

@ -267,9 +267,8 @@ export const ModelingMachineProvider = ({
'Set Segment Overlays': assign({
segmentOverlays: ({ context: { segmentOverlays }, event }) => {
if (event.type !== 'Set Segment Overlays') return {}
if (event.data.type === 'add-many')
if (event.data.type === 'set-many')
return {
...segmentOverlays,
...event.data.overlays,
}
if (event.data.type === 'set-one')
@ -1393,6 +1392,8 @@ export const ModelingMachineProvider = ({
})
)
)
result.exprInsertIndex = data.namedValue.insertIndex
if (
trap(parseResultAfterInsertion) ||
!resultIsOk(parseResultAfterInsertion)
@ -1401,7 +1402,7 @@ export const ModelingMachineProvider = ({
result = {
modifiedAst: parseResultAfterInsertion.program,
pathToReplaced: astAfterReplacement.pathToReplaced,
exprInsertIndex: astAfterReplacement.exprInsertIndex,
exprInsertIndex: result.exprInsertIndex,
}
} else if ('valueText' in data.namedValue) {
// If they didn't provide a constant name,