Skip to content

Commit

Permalink
fix map panel not saving correctly in slideshows
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Coulson committed May 8, 2024
1 parent b0ec377 commit 4ccf66c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/editor/slide-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
<div class="flex mt-4">
<span class="font-bold text-xl">{{ $t('editor.slides.content') }}:</span>
<span class="ml-auto flex-grow"></span>
<div v-if="(panelIndex === 1 && !advancedEditorView) || rightOnly" class="flex flex-col mr-8">
<div v-if="!advancedEditorView || rightOnly" class="flex flex-col mr-8">
<label class="editor-label text-left text-lg">{{ $t('editor.slides.contentType') }}:</label>
<select
ref="typeSelector"
Expand Down
6 changes: 5 additions & 1 deletion src/components/editor/slideshow-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,16 @@ export default class SlideshowEditorV extends Vue {
itemConfig = (this.$refs.slideEditor as any).panel;
}
if (itemConfig.type !== PanelType.Text && itemConfig.type !== PanelType.Map) {
if (itemConfig.type !== PanelType.Text) {
if (
this.$refs.slideEditor !== undefined &&
typeof (this.$refs.slideEditor as ImageEditorV | ChartEditorV).saveChanges === 'function'
) {
(this.$refs.slideEditor as ImageEditorV | ChartEditorV).saveChanges();
if (itemConfig.type === PanelType.Map) {
this.$emit('slide-edit');
}
}
}
Expand Down

0 comments on commit 4ccf66c

Please sign in to comment.