|
@@ -1,30 +1,5 @@
|
|
|
<template>
|
|
|
<div class="row items-baseline">
|
|
|
- <div class="col-xs-12 col-sm-auto text-weight-bold text-center q-px-md q-py-sm">
|
|
|
- <div :style="flexRowTitleStyle">
|
|
|
- Modes to plot
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-xs-grow col-sm q-px-xs">
|
|
|
- <div class="row justify-xs-center justify-sm-start items-center">
|
|
|
-
|
|
|
- <div class="col-auto">
|
|
|
- <q-input
|
|
|
- v-model.number="numberOfModesToPlot"
|
|
|
- outlined
|
|
|
- type="number"
|
|
|
- min=1
|
|
|
- :max='maxModes'
|
|
|
- step=1
|
|
|
- dense
|
|
|
- :style="'width: '+basicSelectorWidthStyle"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="q-ma-xs"/>
|
|
|
- <div class="row items-baseline">
|
|
|
<div class="col-xs-12 col-sm-auto text-center q-px-md q-py-sm">
|
|
|
<div :style="flexRowTitleStyle">
|
|
|
<span class="text-weight-bold">Plot label</span> (optional)
|
|
@@ -58,14 +33,12 @@
|
|
|
import {
|
|
|
defineComponent,
|
|
|
computed,
|
|
|
- watch,
|
|
|
} from 'vue'
|
|
|
import { event } from 'quasar'
|
|
|
const { stopAndPrevent } = event
|
|
|
|
|
|
import { useStore } from 'src/store'
|
|
|
import { flexRowTitleStyle,
|
|
|
- maxNumberOfModesToPlot as maxModes,
|
|
|
basicSelectorWidthStyle,
|
|
|
basicWidthStyle
|
|
|
} from 'components/config'
|
|
@@ -75,17 +48,6 @@ export default defineComponent({
|
|
|
|
|
|
setup() {
|
|
|
const $store = useStore()
|
|
|
- const numberOfModesToPlot = computed({
|
|
|
- get: () => $store.state.simulationSetup.gui.numberOfModesToPlot,
|
|
|
- set: val => {
|
|
|
- let intVal = parseInt(val.toString())
|
|
|
- if (isNaN(intVal)) return
|
|
|
- if (intVal<1) intVal = 1
|
|
|
- if (intVal>maxModes) intVal = maxModes
|
|
|
- $store.commit('simulationSetup/setNumberOfModesToPlot', intVal)
|
|
|
- $store.commit('plotRuntime/resizeSelectorIsPlotMode',intVal)
|
|
|
- }
|
|
|
- })
|
|
|
|
|
|
const plotLabel = computed({
|
|
|
get: ()=> $store.state.simulationSetup.gui.plotLabel,
|
|
@@ -110,15 +72,7 @@ export default defineComponent({
|
|
|
return particleType+' R='+R+units
|
|
|
})
|
|
|
|
|
|
- watch(numberOfModesToPlot, ()=>{
|
|
|
- const intVal = parseInt(numberOfModesToPlot.value.toString())
|
|
|
- if (isNaN(intVal)) return
|
|
|
- if (intVal<1) numberOfModesToPlot.value = 1
|
|
|
- if (intVal>maxModes) numberOfModesToPlot.value = maxModes
|
|
|
- })
|
|
|
-
|
|
|
return { flexRowTitleStyle, basicSelectorWidthStyle, basicWidthStyle,
|
|
|
- numberOfModesToPlot, maxModes,
|
|
|
plotLabel, isRemovePlots,
|
|
|
shadowText,
|
|
|
|