bump three point arc to be the default (#6464)

* bump three point arc up

* Update tests to select tangential arc from dropdown

* Fix another test that used tangential arc

* Fix up snapshot tests' use of Tangential Arc

---------

Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
This commit is contained in:
Kurt Hutten
2025-04-25 06:40:33 +10:00
committed by GitHub
parent 6e0f1e71b2
commit 6641e1178b
5 changed files with 70 additions and 69 deletions

View File

@ -492,37 +492,6 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
{
id: 'arcs',
array: [
{
id: 'tangential-arc',
onClick: ({ modelingState, modelingSend }) =>
modelingSend({
type: 'change tool',
data: {
tool: !modelingState.matches({ Sketch: 'Tangential arc to' })
? 'tangentialArc'
: 'none',
},
}),
icon: 'arc',
status: 'available',
disabled: (state) =>
(!isEditingExistingSketch(state.context) &&
!state.matches({ Sketch: 'Tangential arc to' })) ||
pipeHasCircle(state.context),
disabledReason: (state) =>
!isEditingExistingSketch(state.context) &&
!state.matches({ Sketch: 'Tangential arc to' })
? "Cannot start a tangential arc because there's no previous line to be tangential to. Try drawing a line first or selecting an existing sketch to edit."
: undefined,
title: 'Tangential Arc',
hotkey: (state) =>
state.matches({ Sketch: 'Tangential arc to' })
? ['Esc', 'A']
: 'A',
description: 'Start drawing an arc tangent to the current segment',
links: [],
isActive: (state) => state.matches({ Sketch: 'Tangential arc to' }),
},
{
id: 'three-point-arc',
onClick: ({ modelingState, modelingSend }) =>
@ -554,6 +523,37 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
isActive: (state) =>
state.matches({ Sketch: 'Arc three point tool' }),
},
{
id: 'tangential-arc',
onClick: ({ modelingState, modelingSend }) =>
modelingSend({
type: 'change tool',
data: {
tool: !modelingState.matches({ Sketch: 'Tangential arc to' })
? 'tangentialArc'
: 'none',
},
}),
icon: 'arc',
status: 'available',
disabled: (state) =>
(!isEditingExistingSketch(state.context) &&
!state.matches({ Sketch: 'Tangential arc to' })) ||
pipeHasCircle(state.context),
disabledReason: (state) =>
!isEditingExistingSketch(state.context) &&
!state.matches({ Sketch: 'Tangential arc to' })
? "Cannot start a tangential arc because there's no previous line to be tangential to. Try drawing a line first or selecting an existing sketch to edit."
: undefined,
title: 'Tangential Arc',
hotkey: (state) =>
state.matches({ Sketch: 'Tangential arc to' })
? ['Esc', 'A']
: 'A',
description: 'Start drawing an arc tangent to the current segment',
links: [],
isActive: (state) => state.matches({ Sketch: 'Tangential arc to' }),
},
{
id: 'arc',
onClick: ({ modelingState, modelingSend }) =>