diff --git a/src/components/metadata-editor.vue b/src/components/metadata-editor.vue
index 721bac98..9993cb2b 100644
--- a/src/components/metadata-editor.vue
+++ b/src/components/metadata-editor.vue
@@ -97,6 +97,7 @@
placement: 'top-end',
touch: false
}"
+ spellcheck="false"
/>
-
-
1 && panelModified(currentSlide.panel[0])) {
- $vfm.open(`right-only-${slideIndex}`);
- } else {
- toggleRightOnly();
- }
- "
- />
+
+
+ 1 && panelModified(currentSlide.panel[0])) {
+ $vfm.open(`right-only-${slideIndex}`);
+ } else {
+ toggleRightOnly();
+ }
+ "
+ />
+
@@ -526,6 +528,10 @@ export default class SlideEditorV extends Vue {
// Switching panel type when dynamic panels are not involved.
this.currentSlide.panel[this.panelIndex] = startingConfig[newType as keyof DefaultConfigs];
}
+
+ if (this.currentSlide.panel.length === 1) {
+ this.currentSlide.rightOnly = true;
+ }
}
removeSourceCounts(panel: BasePanel): void {
@@ -661,24 +667,24 @@ export default class SlideEditorV extends Vue {
if (this.centerSlide) {
this.currentSlide.panel[0].customStyles = 'text-align: right;';
} else {
- this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
+ this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: right;',
''
);
}
- } else if (this.rightOnly) {
+ } else if (this.rightOnly || this.currentSlide.panel.length === 1) {
if (this.centerSlide) {
this.currentSlide.panel[0].customStyles = 'text-align: center;';
} else {
- this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
+ this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: right;',
''
);
- this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
+ this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: left;',
''
);
- this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
+ this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: center;',
''
);
@@ -688,11 +694,11 @@ export default class SlideEditorV extends Vue {
this.currentSlide.panel[0].customStyles = 'text-align: right;';
this.currentSlide.panel[1].customStyles = 'text-align: left;';
} else {
- this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
+ this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: right;',
''
);
- this.currentSlide.panel[1].customStyles = (this.currentSlide.panel[1].customStyles || '').replace(
+ this.currentSlide.panel[1].customStyles = (this.currentSlide.panel[1]?.customStyles || '').replace(
'text-align: left;',
''
);
@@ -708,7 +714,7 @@ export default class SlideEditorV extends Vue {
}
} else {
for (const p in this.currentSlide.panel) {
- this.currentSlide.panel[p].customStyles = (this.currentSlide.panel[p].customStyles || '').replace(
+ this.currentSlide.panel[p].customStyles = (this.currentSlide.panel[p]?.customStyles || '').replace(
'text-align: center;',
''
);