Wire up edit flow for symmetric
This commit is contained in:
@ -95,12 +95,23 @@ const prepareToEditExtrude: PrepareToEditCallback = async ({ operation }) => {
|
||||
return { reason: "Couldn't retrieve length argument" }
|
||||
}
|
||||
|
||||
// symmetric argument from a string to a KCL expression
|
||||
let symmetric: boolean | undefined
|
||||
if ('symmetric' in operation.labeledArgs && operation.labeledArgs.symmetric) {
|
||||
symmetric =
|
||||
codeManager.code.slice(
|
||||
operation.labeledArgs.symmetric.sourceRange[0],
|
||||
operation.labeledArgs.symmetric.sourceRange[1]
|
||||
) === 'true'
|
||||
}
|
||||
|
||||
// 3. Assemble the default argument values for the command,
|
||||
// with `nodeToEdit` set, which will let the actor know
|
||||
// to edit the node that corresponds to the StdLibCall.
|
||||
const argDefaultValues: ModelingCommandSchema['Extrude'] = {
|
||||
sketches,
|
||||
length,
|
||||
symmetric,
|
||||
nodeToEdit: pathToNodeFromRustNodePath(operation.nodePath),
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user