From 0a3d12fc8179d6d3c416b5655aa0b86eecbe91dc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 18 Jul 2020 14:52:58 +0200 Subject: flush debounce events --- animism-align/frontend/views/align/align.actions.js | 4 +++- .../views/paragraph/components/paragraphTypes/paragraphTypes.video.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'animism-align/frontend') diff --git a/animism-align/frontend/views/align/align.actions.js b/animism-align/frontend/views/align/align.actions.js index 6d01fc0..2ace824 100644 --- a/animism-align/frontend/views/align/align.actions.js +++ b/animism-align/frontend/views/align/align.actions.js @@ -28,9 +28,11 @@ export const setCursor = cursor_ts => dispatch => ( export const setSelectedAnnotation = annotation => dispatch => { dispatch({ type: types.align.set_selected_annotation, data: annotation }) + debouncedUpdateAnnotation.flush() } export const clearSelectedAnnotation = () => dispatch => { - dispatch({ type: types.align.clear_selected_annotation, }) + dispatch({ type: types.align.clear_selected_annotation }) + debouncedUpdateAnnotation.flush() } export const updateSelectedAnnotation = annotation => dispatch => { dispatch({ type: types.align.set_selected_annotation, data: { ...annotation } }) diff --git a/animism-align/frontend/views/paragraph/components/paragraphTypes/paragraphTypes.video.js b/animism-align/frontend/views/paragraph/components/paragraphTypes/paragraphTypes.video.js index f5f874f..423864b 100644 --- a/animism-align/frontend/views/paragraph/components/paragraphTypes/paragraphTypes.video.js +++ b/animism-align/frontend/views/paragraph/components/paragraphTypes/paragraphTypes.video.js @@ -13,7 +13,7 @@ export const MediaVideo = ({ paragraph, media, currentParagraph, currentAnnotati className={className} onDoubleClick={e => onDoubleClick(e, paragraph)} > - + ) } -- cgit v1.2.3-70-g09d2