Skip to content

Commit

Permalink
Merge pull request #395 from Carifio24/fix-adjusting-min-max
Browse files Browse the repository at this point in the history
Fix issues with adjusting min/max values for size and cmap
  • Loading branch information
dhomeier authored Aug 31, 2023
2 parents 33afdfb + 4d611ee commit 83aeb3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions glue_jupyter/common/state_widgets/layer_scatter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<v-select label="attribute" :items="cmap_att_items" v-model="cmap_att_selected" hide-details />
</div>
<div>
<v-text-field label="min" v-model="glue_state.cmap_vmin" hide-details></v-text-field>
<glue-float-field label="min" :value.sync="glue_state.cmap_vmin" />
</div>
<div>
<v-text-field label="max" v-model="glue_state.cmap_vmax" hide-details></v-text-field>
<glue-float-field label="max" :value.sync="glue_state.cmap_vmax" />
</div>
<div>
<v-select label="colormap" :items="cmap_items" :value="glue_state.cmap" @change="set_colormap" hide-details/>
Expand All @@ -39,10 +39,10 @@
<v-select label="attribute" :items="size_att_items" v-model="size_att_selected" hide-details />
</div>
<div>
<v-text-field label="min" v-model="glue_state.size_vmin" hide-details></v-text-field>
<glue-float-field label="min" :value.sync="glue_state.size_vmin" />
</div>
<div>
<v-text-field label="max" v-model="glue_state.size_vmax" hide-details></v-text-field>
<glue-float-field label="max" :value.sync="glue_state.size_vmax" />
</div>
</template>
<template v-if="glue_state.density_map">
Expand Down
2 changes: 1 addition & 1 deletion glue_jupyter/state_traitlets_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def update_state_from_dict(state, changes):
callback_dict[k] = changes[name][k]
else:
if changes[name] != MAGIC_IGNORE and getattr(state, name) != changes[name]:
if 'cmap' in name:
if name == 'cmap':
if changes[name] != state.cmap.name:
setattr(state, name, get_cmap(changes[name]))
else:
Expand Down

0 comments on commit 83aeb3a

Please sign in to comment.