Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with adjusting min/max values for size and cmap #395

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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