fix plot creator

closes #561
This commit is contained in:
Matthias 2021-11-01 19:53:06 +01:00
parent 80d82a9b49
commit 11ac1f8aba
2 changed files with 17 additions and 6 deletions

View File

@ -37,6 +37,7 @@
variant="primary"
title="Add indicator to plot"
size="sm"
:disabled="addNewIndicator"
@click="addNewIndicator = !addNewIndicator"
>
Add new indicator
@ -54,6 +55,7 @@
</div>
<PlotIndicator
v-if="selIndicatorName || addNewIndicator"
v-model="selIndicator"
class="mt-1"
:columns="columns"
@ -162,7 +164,7 @@ export default class PlotConfigurator extends Vue {
}
set selIndicator(newValue: Record<string, IndicatorConfig>) {
console.log('newValue', newValue);
// console.log('newValue', newValue);
const name = Object.keys(newValue)[0];
// this.currentPlotConfig[this.selIndicatorName] = { ...newValue[name] };
// this.emitPlotConfig();
@ -316,7 +318,7 @@ export default class PlotConfigurator extends Vue {
}
savePlotConfig() {
this.saveCustomPlotConfig({ [this.plotConfigName]: this.plotConfig });
this.saveCustomPlotConfig({ [this.plotConfigNameLoc]: this.plotConfig });
}
loadPlotConfig() {

View File

@ -45,12 +45,19 @@
</b-input-group>
</b-form-group>
<div class="d-flex d-flex-columns d-flex">
<b-button v-if="addNew" variant="primary" title="Add " size="sm" @click="emitIndicator">
Add new indicator
<b-button
v-if="addNew"
class="flex-grow-1"
variant="primary"
title="Add "
size="sm"
@click="emitIndicator"
>
Save indicator
</b-button>
<b-button
v-if="addNew"
class="ml-1"
class="ml-1 flex-grow-1"
variant="primary"
title="Add "
size="sm"
@ -102,7 +109,9 @@ export default class PlotIndicator extends Vue {
@Watch('selColor')
watchColor() {
this.emitIndicator();
if (!this.addNew) {
this.emitIndicator();
}
}
clickCancel() {