Skip to content

Commit

Permalink
fix typing animation not working, closes #1960
Browse files Browse the repository at this point in the history
  • Loading branch information
HardeepAsrani committed Nov 14, 2023
1 parent 60129ef commit 53b2838
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/animation/count/inline-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ import { format as settings } from './index.js';

import { updateAnimConfig } from '../editor.js';

// Fitler out 'custom' value from delayList and speedList
delayList.pop();
speedList.pop();

const InlineControls = ({
value,
contentRef
Expand Down Expand Up @@ -99,14 +103,14 @@ const InlineControls = ({
label={ __( 'Delay', 'otter-blocks' ) }
value={ countDelay || 'none' }
options={ delayList }
onChange={ value => updateAnimConfig( 'count', countDelay, value, () => setCountDelay( value ) ), attributes, setAttributes }
onChange={ value => updateAnimConfig( 'count', countDelay, value, () => setCountDelay( value ), attributes, setAttributes ) }
/>

<SelectControl
label={ __( 'Speed', 'otter-blocks' ) }
value={ countSpeed || 'none' }
options={ speedList }
onChange={ value => updateAnimConfig( 'count', countSpeed, value, () => setTypingSpeed( value ) ), attributes, setAttributes }
onChange={ value => updateAnimConfig( 'count', countSpeed, value, () => setCountSpeed( value ), attributes, setAttributes ) }
/>

{ applyFilters( 'otter.poweredBy', '' ) }
Expand Down
4 changes: 4 additions & 0 deletions src/animation/typing/inline-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ import { format as settings } from './index.js';

import { updateAnimConfig } from '../editor.js';

// Fitler out 'custom' value from delayList and speedList
delayList.pop();
speedList.pop();

const InlineControls = ({
value,
contentRef
Expand Down

0 comments on commit 53b2838

Please sign in to comment.