Cursors should stay after a code-mod (#113)
* setup to get path to nodes back from ast-mods * fix cursor setting for constraint buttons that use transformSecondarySketchLinesTagFirst * fix cursors for constraints that use transformAstSketchLines
This commit is contained in:
@ -536,10 +536,16 @@ export function giveSketchFnCallTag(
|
||||
ast: Program,
|
||||
range: Selection['range'],
|
||||
tag?: string
|
||||
): { modifiedAst: Program; tag: string; isTagExisting: boolean } {
|
||||
): {
|
||||
modifiedAst: Program
|
||||
tag: string
|
||||
isTagExisting: boolean
|
||||
pathToNode: PathToNode
|
||||
} {
|
||||
const path = getNodePathFromSourceRange(ast, range)
|
||||
const { node: primaryCallExp } = getNodeFromPath<CallExpression>(
|
||||
ast,
|
||||
getNodePathFromSourceRange(ast, range),
|
||||
path,
|
||||
'CallExpression'
|
||||
)
|
||||
const firstArg = getFirstArg(primaryCallExp)
|
||||
@ -557,6 +563,7 @@ export function giveSketchFnCallTag(
|
||||
modifiedAst: ast,
|
||||
tag: tagStr,
|
||||
isTagExisting,
|
||||
pathToNode: path,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user