|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <ReactiveChart :chart="$store.state.plotRuntime.spectraPlot"/>
|
|
|
+ <ReactiveChart :chart="$store.state.plotRuntime.spectrumPlots"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -9,12 +9,9 @@ import ReactiveChart from 'components/ReactiveChart.vue'
|
|
|
import { useStore } from 'src/store'
|
|
|
import {
|
|
|
defineComponent,
|
|
|
- // ref,
|
|
|
- // reactive,
|
|
|
computed,
|
|
|
watch
|
|
|
} from 'vue'
|
|
|
-// import { toUnits } from 'components/utils'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'PlotSpectra',
|
|
@@ -24,23 +21,23 @@ export default defineComponent({
|
|
|
setup () {
|
|
|
const $store = useStore()
|
|
|
const isPlotQsca = computed( ()=>$store.state.plotRuntime.isPlotQsca)
|
|
|
- watch(isPlotQsca, ()=>$store.commit('plotRuntime/updateSpectraPlot'))
|
|
|
+ watch(isPlotQsca, ()=>$store.commit('plotRuntime/updateSpectrumPlots'))
|
|
|
const isPlotQabs = computed( ()=>$store.state.plotRuntime.isPlotQabs)
|
|
|
- watch(isPlotQabs, ()=>$store.commit('plotRuntime/updateSpectraPlot'))
|
|
|
+ watch(isPlotQabs, ()=>$store.commit('plotRuntime/updateSpectrumPlots'))
|
|
|
const isPlotQext = computed( ()=>$store.state.plotRuntime.isPlotQext)
|
|
|
- watch(isPlotQext, ()=>$store.commit('plotRuntime/updateSpectraPlot'))
|
|
|
+ watch(isPlotQext, ()=>$store.commit('plotRuntime/updateSpectrumPlots'))
|
|
|
|
|
|
const isPlotQscaTotal = computed( ()=>$store.state.plotRuntime.isPlotQscaTotal)
|
|
|
- watch(isPlotQscaTotal, ()=>$store.commit('plotRuntime/updateSpectraPlot'))
|
|
|
+ watch(isPlotQscaTotal, ()=>$store.commit('plotRuntime/updateSpectrumPlots'))
|
|
|
const isPlotQabsTotal = computed( ()=>$store.state.plotRuntime.isPlotQabsTotal)
|
|
|
- watch(isPlotQabsTotal, ()=>$store.commit('plotRuntime/updateSpectraPlot'))
|
|
|
+ watch(isPlotQabsTotal, ()=>$store.commit('plotRuntime/updateSpectrumPlots'))
|
|
|
const isPlotQextTotal = computed( ()=>$store.state.plotRuntime.isPlotQextTotal)
|
|
|
- watch(isPlotQextTotal, ()=>$store.commit('plotRuntime/updateSpectraPlot'))
|
|
|
+ watch(isPlotQextTotal, ()=>$store.commit('plotRuntime/updateSpectrumPlots'))
|
|
|
|
|
|
const isPlotModeE = computed( ()=>$store.state.plotRuntime.isPlotModeE)
|
|
|
- watch(isPlotModeE, ()=>$store.commit('plotRuntime/updateSpectraPlot'), { deep: true })
|
|
|
+ watch(isPlotModeE, ()=>$store.commit('plotRuntime/updateSpectrumPlots'), { deep: true })
|
|
|
const isPlotModeH = computed( ()=>$store.state.plotRuntime.isPlotModeH)
|
|
|
- watch(isPlotModeH, ()=>$store.commit('plotRuntime/updateSpectraPlot'), { deep: true })
|
|
|
+ watch(isPlotModeH, ()=>$store.commit('plotRuntime/updateSpectrumPlots'), { deep: true })
|
|
|
|
|
|
const sourceUnits = computed( ()=>$store.state.guiRuntime.sourceUnits)
|
|
|
function setPlotTitle() {
|
|
@@ -57,14 +54,14 @@ export default defineComponent({
|
|
|
$store.commit('plotRuntime/updateXAxisTitle', title)
|
|
|
}
|
|
|
|
|
|
- function updateSpectraPlotUnits(){
|
|
|
+ function updateSpectraPlotsUnits(){
|
|
|
setPlotTitle()
|
|
|
$store.commit('plotRuntime/setWLsInUnits', sourceUnits.value)
|
|
|
- $store.commit('plotRuntime/updateSpectraPlot')
|
|
|
+ $store.commit('plotRuntime/updateSpectrumPlots')
|
|
|
}
|
|
|
|
|
|
- updateSpectraPlotUnits()
|
|
|
- watch(sourceUnits, ()=> updateSpectraPlotUnits())
|
|
|
+ updateSpectraPlotsUnits()
|
|
|
+ watch(sourceUnits, ()=> updateSpectraPlotsUnits())
|
|
|
|
|
|
return {}
|
|
|
}
|