diff --git a/src/components/forms/ValueSelect.tsx b/src/components/forms/ValueSelect.tsx index a8207f4f4..6524636e5 100644 --- a/src/components/forms/ValueSelect.tsx +++ b/src/components/forms/ValueSelect.tsx @@ -214,7 +214,6 @@ interface ValueSelectProps { onChange: (newValue: ScriptValue | undefined) => void; innerValue?: boolean; fixedType?: boolean; - includeDirection?: boolean; placeholder?: string; min?: number; max?: number; @@ -228,7 +227,6 @@ const ValueSelect = ({ onChange, innerValue, fixedType, - includeDirection, placeholder, min, max, @@ -374,24 +372,6 @@ const ValueSelect = ({ const menu = useMemo( () => [ - ...(includeDirection && !isValueFn - ? [ - { - onChange({ - type: "direction", - value: "left", - }); - }} - > - - {value.type === "direction" ? : } - - {l10n("FIELD_DIRECTION")} - , - ] - : []), ...(!isValueFn ? [ @@ -440,6 +420,20 @@ const ValueSelect = ({ {l10n("FIELD_EXPRESSION")} , + { + onChange({ + type: "direction", + value: "left", + }); + }} + > + + {value.type === "direction" ? : } + + {l10n("FIELD_DIRECTION")} + , , ] : []), @@ -495,7 +489,6 @@ const ValueSelect = ({ [ context.type, editorType, - includeDirection, isValueFn, onChange, setNumber, diff --git a/src/components/script/ScriptEventFormInput.tsx b/src/components/script/ScriptEventFormInput.tsx index b187aa5dd..e39c8f173 100644 --- a/src/components/script/ScriptEventFormInput.tsx +++ b/src/components/script/ScriptEventFormInput.tsx @@ -367,9 +367,6 @@ const ScriptEventFormInput = ({ isValueScript ? value : isDefaultScript ? defaultValue : undefined } onChange={onChangeField} - includeDirection={ - isDefaultScript ? defaultValue.type === "direction" : false - } min={field.min} max={field.max} step={field.step}