Skip to content

Commit

Permalink
Merge pull request #5 from sciserver/number-entry-fix
Browse files Browse the repository at this point in the history
Set number steps manually for each variable
  • Loading branch information
dmedv authored Aug 8, 2023
2 parents 29021b0 + 623ee51 commit ed14456
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/RightDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@
></v-select>
<v-divider style="margin: 8px 0 8px 0"/>
{{variable.units}}<v-img contain :src="colormapUrl" />
<v-slider v-model="tempMin" :min="variable.vmin" :max="variable.vmax" :step="(variable.vmax-variable.vmin)/100.0" :label="'min ['+variable.units+']'" class="align-center" @end="updateValues()">
<v-slider v-model="tempMin" :min="variable.vmin" :max="variable.vmax" :step="variable.step" :label="'min ['+variable.units+']'" class="align-center" @end="updateValues()">
<template v-slot:append>
<v-text-field
v-model="tempMin"
type="number"
:step="variable.step"
style="width: 80px"
@change="updateValues()"
></v-text-field>
</template>
</v-slider>
<v-slider v-model="tempMax" :min="variable.vmin" :max="variable.vmax" :step="(variable.vmax-variable.vmin)/100.0" :label="'max ['+variable.units+']'" class="align-center" @end="updateValues()">
<v-slider v-model="tempMax" :min="variable.vmin" :max="variable.vmax" :step="variable.step" :label="'max ['+variable.units+']'" class="align-center" @end="updateValues()">
<template v-slot:append>
<v-text-field
v-model="tempMax"
type="number"
:step="variable.step"
style="width: 80px"
@change="updateValues()"
></v-text-field>
Expand Down
3 changes: 3 additions & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,23 @@ export default new Vuex.Store({
label: 'Salinity',
vmin: 30,
vmax: 37,
step: 0.1,
units: 'PSU'
},
{
name: 'SST',
label: 'Temperature',
vmin: -2,
vmax: 30,
step: 0.1,
units: '°C'
},
{
name: 'Eta',
label: 'Surface height anomaly',
vmin: -2,
vmax: 2,
step: 0.05,
units: 'm'
},
/*
Expand Down

0 comments on commit ed14456

Please sign in to comment.