From 7c098c46550b5de00e262004c1d56afaa9811463 Mon Sep 17 00:00:00 2001 From: Cole Lawrence Date: Wed, 20 Apr 2022 11:32:22 -0400 Subject: [PATCH] Fix typo to `permanentlySetValue` --- .../panels/DetailPanel/propEditors/BooleanPropEditor.tsx | 2 +- .../panels/DetailPanel/propEditors/NumberPropEditor.tsx | 2 +- .../src/panels/DetailPanel/propEditors/RgbaPropEditor.tsx | 6 +++--- .../DetailPanel/propEditors/StringLiteralPropEditor.tsx | 2 +- .../panels/DetailPanel/propEditors/StringPropEditor.tsx | 2 +- .../propEditors/utils/useEditingToolsForPrimitiveProp.tsx | 4 ++-- .../CurveEditorPopover/CurveEditorPopover.tsx | 8 ++++---- .../Right/LengthIndicator/LengthEditorPopover.tsx | 2 +- .../RightOverlay/PlayheadPositionPopover.tsx | 2 +- theatre/studio/src/uiComponents/form/BasicNumberInput.tsx | 6 +++--- theatre/studio/src/uiComponents/form/BasicStringInput.tsx | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/theatre/studio/src/panels/DetailPanel/propEditors/BooleanPropEditor.tsx b/theatre/studio/src/panels/DetailPanel/propEditors/BooleanPropEditor.tsx index 53cf76a..cc109d3 100644 --- a/theatre/studio/src/panels/DetailPanel/propEditors/BooleanPropEditor.tsx +++ b/theatre/studio/src/panels/DetailPanel/propEditors/BooleanPropEditor.tsx @@ -23,7 +23,7 @@ const BooleanPropEditor: React.FC<{ const onChange = useCallback( (el: React.ChangeEvent) => { - stuff.permenantlySetValue(Boolean(el.target.checked)) + stuff.permanentlySetValue(Boolean(el.target.checked)) }, [propConfig, pointerToProp, obj], ) diff --git a/theatre/studio/src/panels/DetailPanel/propEditors/NumberPropEditor.tsx b/theatre/studio/src/panels/DetailPanel/propEditors/NumberPropEditor.tsx index 07f4c24..5152085 100644 --- a/theatre/studio/src/panels/DetailPanel/propEditors/NumberPropEditor.tsx +++ b/theatre/studio/src/panels/DetailPanel/propEditors/NumberPropEditor.tsx @@ -29,7 +29,7 @@ const NumberPropEditor: React.FC<{ value={stuff.value} temporarilySetValue={stuff.temporarilySetValue} discardTemporaryValue={stuff.discardTemporaryValue} - permenantlySetValue={stuff.permenantlySetValue} + permanentlySetValue={stuff.permanentlySetValue} range={propConfig.range} nudge={nudge} /> diff --git a/theatre/studio/src/panels/DetailPanel/propEditors/RgbaPropEditor.tsx b/theatre/studio/src/panels/DetailPanel/propEditors/RgbaPropEditor.tsx index 558ed50..3c7e00b 100644 --- a/theatre/studio/src/panels/DetailPanel/propEditors/RgbaPropEditor.tsx +++ b/theatre/studio/src/panels/DetailPanel/propEditors/RgbaPropEditor.tsx @@ -76,7 +76,7 @@ const RgbaPropEditor: React.FC<{ const onChange = useCallback( (color: string) => { const rgba = decorateRgba(parseRgbaFromHex(color)) - stuff.permenantlySetValue(rgba) + stuff.permanentlySetValue(rgba) }, [stuff], ) @@ -98,7 +98,7 @@ const RgbaPropEditor: React.FC<{ permanentlySetValue={(color) => { // console.log('perm') const rgba = decorateRgba(color) - stuff.permenantlySetValue(rgba) + stuff.permanentlySetValue(rgba) }} discardTemporaryValue={stuff.discardTemporaryValue} /> @@ -120,7 +120,7 @@ const RgbaPropEditor: React.FC<{ value={rgba2hex(stuff.value)} temporarilySetValue={noop} discardTemporaryValue={noop} - permenantlySetValue={onChange} + permanentlySetValue={onChange} isValid={(v) => !!v.match(/^#?([0-9a-f]{8})$/i)} /> diff --git a/theatre/studio/src/panels/DetailPanel/propEditors/StringLiteralPropEditor.tsx b/theatre/studio/src/panels/DetailPanel/propEditors/StringLiteralPropEditor.tsx index d504bd0..d9c50a2 100644 --- a/theatre/studio/src/panels/DetailPanel/propEditors/StringLiteralPropEditor.tsx +++ b/theatre/studio/src/panels/DetailPanel/propEditors/StringLiteralPropEditor.tsx @@ -20,7 +20,7 @@ const StringLiteralPropEditor: React.FC<{ const onChange = useCallback( (val: string) => { - stuff.permenantlySetValue(val) + stuff.permanentlySetValue(val) }, [propConfig, pointerToProp, obj], ) diff --git a/theatre/studio/src/panels/DetailPanel/propEditors/StringPropEditor.tsx b/theatre/studio/src/panels/DetailPanel/propEditors/StringPropEditor.tsx index 5ee8020..a406dd2 100644 --- a/theatre/studio/src/panels/DetailPanel/propEditors/StringPropEditor.tsx +++ b/theatre/studio/src/panels/DetailPanel/propEditors/StringPropEditor.tsx @@ -22,7 +22,7 @@ const StringPropEditor: React.FC<{ value={stuff.value} temporarilySetValue={stuff.temporarilySetValue} discardTemporaryValue={stuff.discardTemporaryValue} - permenantlySetValue={stuff.permenantlySetValue} + permanentlySetValue={stuff.permanentlySetValue} /> ) diff --git a/theatre/studio/src/panels/DetailPanel/propEditors/utils/useEditingToolsForPrimitiveProp.tsx b/theatre/studio/src/panels/DetailPanel/propEditors/utils/useEditingToolsForPrimitiveProp.tsx index 30352ea..38c04ef 100644 --- a/theatre/studio/src/panels/DetailPanel/propEditors/utils/useEditingToolsForPrimitiveProp.tsx +++ b/theatre/studio/src/panels/DetailPanel/propEditors/utils/useEditingToolsForPrimitiveProp.tsx @@ -23,7 +23,7 @@ interface CommonStuff { temporarilySetValue(v: T): void discardTemporaryValue(): void - permenantlySetValue(v: T): void + permanentlySetValue(v: T): void } interface Default extends CommonStuff { @@ -76,7 +76,7 @@ export function useEditingToolsForPrimitiveProp< currentScrub = null } }, - permenantlySetValue(v: T): void { + permanentlySetValue(v: T): void { if (currentScrub) { currentScrub.capture((api) => { api.set(pointerToProp, v) diff --git a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/CurveEditorPopover.tsx b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/CurveEditorPopover.tsx index 820ac54..051bb5c 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/CurveEditorPopover.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/CurveEditorPopover.tsx @@ -192,7 +192,7 @@ const CurveEditorPopover: React.FC< tempTransaction = undefined } }, - permenantlySetValue(newCurve: string): void { + permanentlySetValue(newCurve: string): void { if (tempTransaction) { tempTransaction.discard() tempTransaction = undefined @@ -282,7 +282,7 @@ const CurveEditorPopover: React.FC< props.onRequestClose() } if (e.key === 'Enter') { - fns.permenantlySetValue(filter) + fns.permanentlySetValue(filter) props.onRequestClose() } }} @@ -302,7 +302,7 @@ const CurveEditorPopover: React.FC< if (e.key === 'Escape') { props.onRequestClose() } else if (e.key === 'Enter') { - fns.permenantlySetValue(preset.value) + fns.permanentlySetValue(preset.value) props.onRequestClose() } if (e.key === 'ArrowRight') { @@ -358,7 +358,7 @@ const CurveEditorPopover: React.FC< ref={optionsRef.current[preset.label]} key={preset.label} onClick={() => { - fns.permenantlySetValue(preset.value) + fns.permanentlySetValue(preset.value) props.onRequestClose() }} // Temporarily apply on hover diff --git a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/LengthIndicator/LengthEditorPopover.tsx b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/LengthIndicator/LengthEditorPopover.tsx index 8ff691e..4586834 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/LengthIndicator/LengthEditorPopover.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/LengthIndicator/LengthEditorPopover.tsx @@ -57,7 +57,7 @@ const LengthEditorPopover: React.FC<{ tempTransaction = undefined } }, - permenantlySetValue(newLength: number): void { + permanentlySetValue(newLength: number): void { if (tempTransaction) { tempTransaction.discard() tempTransaction = undefined diff --git a/theatre/studio/src/panels/SequenceEditorPanel/RightOverlay/PlayheadPositionPopover.tsx b/theatre/studio/src/panels/SequenceEditorPanel/RightOverlay/PlayheadPositionPopover.tsx index 15ffa15..ba6dd9d 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/RightOverlay/PlayheadPositionPopover.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/RightOverlay/PlayheadPositionPopover.tsx @@ -55,7 +55,7 @@ const PlayheadPositionPopover: React.FC<{ sequence.position = originalPosition } }, - permenantlySetValue(newPosition: number): void { + permanentlySetValue(newPosition: number): void { if (tempPosition) { tempPosition = undefined } diff --git a/theatre/studio/src/uiComponents/form/BasicNumberInput.tsx b/theatre/studio/src/uiComponents/form/BasicNumberInput.tsx index 7f1099c..d7ab8e6 100644 --- a/theatre/studio/src/uiComponents/form/BasicNumberInput.tsx +++ b/theatre/studio/src/uiComponents/form/BasicNumberInput.tsx @@ -105,7 +105,7 @@ const BasicNumberInput: React.FC<{ value: number temporarilySetValue: (v: number) => void discardTemporaryValue: () => void - permenantlySetValue: (v: number) => void + permanentlySetValue: (v: number) => void className?: string range?: [min: number, max: number] isValid?: (v: number) => boolean @@ -167,7 +167,7 @@ const BasicNumberInput: React.FC<{ if (curState.valueBeforeEditing === value) { propsRef.current.discardTemporaryValue() } else { - propsRef.current.permenantlySetValue(value) + propsRef.current.permanentlySetValue(value) } } } @@ -243,7 +243,7 @@ const BasicNumberInput: React.FC<{ if (curState.valueBeforeDragging === value) { propsRef.current.discardTemporaryValue() } else { - propsRef.current.permenantlySetValue(value) + propsRef.current.permanentlySetValue(value) } stateRef.current = {mode: 'noFocus'} } diff --git a/theatre/studio/src/uiComponents/form/BasicStringInput.tsx b/theatre/studio/src/uiComponents/form/BasicStringInput.tsx index d17fade..f343444 100644 --- a/theatre/studio/src/uiComponents/form/BasicStringInput.tsx +++ b/theatre/studio/src/uiComponents/form/BasicStringInput.tsx @@ -55,7 +55,7 @@ const BasicStringInput: React.FC<{ value: string temporarilySetValue: (v: string) => void discardTemporaryValue: () => void - permenantlySetValue: (v: string) => void + permanentlySetValue: (v: string) => void className?: string isValid?: (v: string) => boolean inputRef?: MutableRefObject @@ -112,7 +112,7 @@ const BasicStringInput: React.FC<{ if (curState.valueBeforeEditing === value) { propsRef.current.discardTemporaryValue() } else { - propsRef.current.permenantlySetValue(value) + propsRef.current.permanentlySetValue(value) } } }