focus on extrude literal when extruding sketch

This commit is contained in:
Kurt Hutten Irev-Dev
2023-01-13 17:58:37 +11:00
parent bd9dab8a29
commit 9ec332d681
6 changed files with 163 additions and 94 deletions

View File

@ -62,8 +62,11 @@ export const Toolbar = () => {
onClick={() => {
if (!ast) return
const pathToNode = getNodePathFromSourceRange(ast, selectionRange)
const { modifiedAst } = extrudeSketch(ast, pathToNode)
updateAst(modifiedAst)
const { modifiedAst, pathToExtrudeArg } = extrudeSketch(
ast,
pathToNode
)
updateAst(modifiedAst, pathToExtrudeArg)
}}
className="border m-1 px-1 rounded"
>
@ -73,8 +76,12 @@ export const Toolbar = () => {
onClick={() => {
if (!ast) return
const pathToNode = getNodePathFromSourceRange(ast, selectionRange)
const { modifiedAst } = extrudeSketch(ast, pathToNode, false)
updateAst(modifiedAst)
const { modifiedAst, pathToExtrudeArg } = extrudeSketch(
ast,
pathToNode,
false
)
updateAst(modifiedAst, pathToExtrudeArg)
}}
className="border m-1 px-1 rounded"
>