From ffbf010b91d3452debcf7d9a1eb9f9268a1f8e9c Mon Sep 17 00:00:00 2001 From: pame Date: Thu, 22 Apr 2021 01:55:58 -0300 Subject: [PATCH] [#350] - Each slide settings: 1st layers, buttons Lock and Preview, title, content, remove button --- src/js/src/map-blocks/storymap-editor.js | 87 +++++++++++----------- src/js/src/map-blocks/storymap-editor.scss | 6 +- 2 files changed, 47 insertions(+), 46 deletions(-) diff --git a/src/js/src/map-blocks/storymap-editor.js b/src/js/src/map-blocks/storymap-editor.js index 32f8ed12..b5dbc365 100755 --- a/src/js/src/map-blocks/storymap-editor.js +++ b/src/js/src/map-blocks/storymap-editor.js @@ -384,49 +384,6 @@ const StoryMapEditor = ( { } } } > - { __( 'Title', 'jeo' ) } - { - // Set role 'button' to editor element so it isn't affected by drag and drop events - editor.ui.getEditableElement().setAttribute('role', 'button') - - setCurrentSlideIndex( index ); - - const oldSlides = [ ...attributes.slides ]; - oldSlides[ index ].title = editor.getData(); - - setAttributes( { - ...attributes, - slides: oldSlides, - } ); - } } - /> - { __( - 'Content', 'jeo' - ) } - { - // Set role 'button' to editor element so it isn't affected by drag and drop events - editor.ui.getEditableElement().setAttribute('role', 'button') - - setCurrentSlideIndex( index ); - - const oldSlides = [ ...attributes.slides ]; - oldSlides[ index ].content = editor.getData(); - - setAttributes( { - ...attributes, - slides: oldSlides, - } ); - } } - /> { __("Layers", "jeo") } @@ -639,6 +596,50 @@ const StoryMapEditor = ( { { __( 'Preview', 'jeo' ) } + + { __( 'Title', 'jeo' ) } + { + // Set role 'button' to editor element so it isn't affected by drag and drop events + editor.ui.getEditableElement().setAttribute('role', 'button') + + setCurrentSlideIndex( index ); + + const oldSlides = [ ...attributes.slides ]; + oldSlides[ index ].title = editor.getData(); + + setAttributes( { + ...attributes, + slides: oldSlides, + } ); + } } + /> + { __( + 'Content', 'jeo' + ) } + { + // Set role 'button' to editor element so it isn't affected by drag and drop events + editor.ui.getEditableElement().setAttribute('role', 'button') + + setCurrentSlideIndex( index ); + + const oldSlides = [ ...attributes.slides ]; + oldSlides[ index ].content = editor.getData(); + + setAttributes( { + ...attributes, + slides: oldSlides, + } ); + } } + />