Users should be able to select points (not just lines) (#97)
* update selection datastructure to accomodate more selection metadata * Users should be able to select points (not just lines)
This commit is contained in:
@ -35,8 +35,8 @@ export const SetAngleLength = ({
|
||||
const [transformInfos, setTransformInfos] = useState<TransformInfo[]>()
|
||||
useEffect(() => {
|
||||
if (!ast) return
|
||||
const paths = selectionRanges.map((selectionRange) =>
|
||||
getNodePathFromSourceRange(ast, selectionRange)
|
||||
const paths = selectionRanges.codeBasedSelections.map(({ range }) =>
|
||||
getNodePathFromSourceRange(ast, range)
|
||||
)
|
||||
const nodes = paths.map(
|
||||
(pathToNode) =>
|
||||
@ -60,7 +60,7 @@ export const SetAngleLength = ({
|
||||
<button
|
||||
onClick={async () => {
|
||||
if (!(transformInfos && ast)) return
|
||||
const { modifiedAst, valueUsedInTransform } = transformAstSketchLines({
|
||||
const { valueUsedInTransform } = transformAstSketchLines({
|
||||
ast: JSON.parse(JSON.stringify(ast)),
|
||||
selectionRanges,
|
||||
transformInfos,
|
||||
|
Reference in New Issue
Block a user