Revert "Improve Prop Typings for Modals. Remove instances of any
. (… (#813)
Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)"
This reverts commit 629f326f4c
.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { create } from 'react-modal-promise'
|
||||
import { toolTips, useStore } from '../../useStore'
|
||||
import { BinaryPart, Value, VariableDeclarator } from '../../lang/wasm'
|
||||
import {
|
||||
@ -11,12 +12,12 @@ import {
|
||||
transformSecondarySketchLinesTagFirst,
|
||||
getTransformInfos,
|
||||
} from '../../lang/std/sketchcombos'
|
||||
import { GetInfoModal, createInfoModal } from '../SetHorVertDistanceModal'
|
||||
import { GetInfoModal } from '../SetHorVertDistanceModal'
|
||||
import { createVariableDeclaration } from '../../lang/modifyAst'
|
||||
import { removeDoubleNegatives } from '../AvailableVarsHelpers'
|
||||
import { updateCursors } from '../../lang/util'
|
||||
|
||||
const getModalInfo = createInfoModal(GetInfoModal)
|
||||
const getModalInfo = create(GetInfoModal as any)
|
||||
|
||||
export const SetAngleBetween = () => {
|
||||
const { guiMode, selectionRanges, ast, programMemory, updateAst, setCursor } =
|
||||
@ -94,19 +95,20 @@ export const SetAngleBetween = () => {
|
||||
variableName,
|
||||
newVariableInsertIndex,
|
||||
sign,
|
||||
}: {
|
||||
segName: string
|
||||
value: number
|
||||
valueNode: Value
|
||||
variableName?: string
|
||||
newVariableInsertIndex: number
|
||||
sign: number
|
||||
} = await getModalInfo({
|
||||
segName: tagInfo?.tag,
|
||||
isSegNameEditable: !tagInfo?.isTagExisting,
|
||||
value: valueUsedInTransform,
|
||||
initialVariableName: 'angle',
|
||||
})
|
||||
if (
|
||||
segName === tagInfo?.tag &&
|
||||
value ===
|
||||
(valueUsedInTransform === undefined
|
||||
? ''
|
||||
: String(Math.abs(valueUsedInTransform)))
|
||||
) {
|
||||
} as any)
|
||||
if (segName === tagInfo?.tag && value === valueUsedInTransform) {
|
||||
updateAst(modifiedAst, true, {
|
||||
callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap),
|
||||
})
|
||||
|
Reference in New Issue
Block a user