Horz/Vert distance constraint with modal workflow (#43)
* button style tweak * Remove duplication constraint ast transforms * giveSketchFnCallTag to return if line already had a tag * remove duplication * update tag name to referenceSegName * Update transform shape to return key details about the transform * add modal to hor vert distance workflow * fix browser env stuff from breaking tests * fmt
This commit is contained in:
@ -4,7 +4,7 @@ import { lexer } from '../tokeniser'
|
||||
import {
|
||||
ConstraintType,
|
||||
getTransformInfos,
|
||||
transformAstForHorzVert,
|
||||
transformAstSketchLines,
|
||||
} from './sketchcombos'
|
||||
import { recast } from '../recast'
|
||||
import { initPromise } from '../rust'
|
||||
@ -32,11 +32,12 @@ function testingSwapSketchFnCall({
|
||||
const transformInfos = getTransformInfos([range], ast, constraintType)
|
||||
|
||||
if (!transformInfos) throw new Error('nope')
|
||||
const { modifiedAst } = transformAstForHorzVert({
|
||||
const { modifiedAst } = transformAstSketchLines({
|
||||
ast,
|
||||
programMemory,
|
||||
selectionRanges: [range],
|
||||
transformInfos,
|
||||
referenceSegName: '',
|
||||
})
|
||||
return {
|
||||
newCode: recast(modifiedAst),
|
||||
|
Reference in New Issue
Block a user