Skip to content

Commit fffddd5

Browse files
authored
Improve path selection for Sweep point-and-click (#8790)
* Draft: Improve path selection for Sweep point-and-click Fixes #8789 * Add TODO
1 parent 31e8979 commit fffddd5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/lang/modifyAst/sweeps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export function addSweep({
238238
}
239239

240240
// Find the path declaration for the labeled argument
241+
// TODO: see if we can replace this with `getVariableExprsFromSelection`
241242
const pathDeclaration = getNodeFromPath<VariableDeclaration>(
242243
ast,
243244
path.graphSelections[0].codeRef.pathToNode,

src/lib/commandBarConfigs/modelingCommandConfig.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,8 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
645645
},
646646
path: {
647647
inputType: 'selection',
648-
selectionTypes: ['segment', 'helix'],
648+
selectionTypes: ['path', 'helix'],
649+
selectionFilter: ['object'],
649650
required: true,
650651
multiple: false,
651652
hidden: (context) => Boolean(context.argumentsToSubmit.nodeToEdit),

0 commit comments

Comments
 (0)