Sketch on chamfer UI (#3918)
* sketch on chamfer start * working * step app from getting in weird state when selection face to sketch on * sketch on chamfer tests * clean up * fix test * fix click selections for chamfers, add tests * fixture setup (#3964) * initial break up * rename main fixture file * add more expect state pattern * add fixture comment * add comments to chamfer function * typos * works without pipeExpr
This commit is contained in:
@ -18,12 +18,24 @@ export function pathMapToSelections(
|
||||
const nodeMeta = getNodeFromPath<any>(ast, path)
|
||||
if (err(nodeMeta)) return
|
||||
const node = nodeMeta.node as any
|
||||
const type = prevSelections.codeBasedSelections[Number(index)].type
|
||||
const selection = prevSelections.codeBasedSelections[Number(index)]
|
||||
if (node) {
|
||||
newSelections.codeBasedSelections.push({
|
||||
range: [node.start, node.end],
|
||||
type: type || 'default',
|
||||
})
|
||||
if (
|
||||
selection.type === 'base-edgeCut' ||
|
||||
selection.type === 'adjacent-edgeCut' ||
|
||||
selection.type === 'opposite-edgeCut'
|
||||
) {
|
||||
newSelections.codeBasedSelections.push({
|
||||
range: [node.start, node.end],
|
||||
type: selection.type,
|
||||
secondaryRange: selection.secondaryRange,
|
||||
})
|
||||
} else {
|
||||
newSelections.codeBasedSelections.push({
|
||||
range: [node.start, node.end],
|
||||
type: selection.type,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return newSelections
|
||||
|
Reference in New Issue
Block a user