Skip to content

Conversation

@CyclingNinja
Copy link
Contributor

No description provided.

@CyclingNinja
Copy link
Contributor Author

@mariobuikhuizen hi there, @astrofrog mentioned you might be able to help us here.

I'm trying to create a template to apply to all state widgets (that need it) that adjusts the bounds of an axis.

its working, but its not populating with the initial values from the glue_state. I've used the

props: { glue_state: { type: Object, default: () => ({ x_min: 0, x_max: 1, y_min: 0, y_max: 1 }) } },

to ensure that glue_state.x_min isn't undefined and the whole thing fall over.

I'd really appreciate your thoughts/help

@mariobuikhuizen
Copy link
Collaborator

mariobuikhuizen commented Nov 20, 2025

Hi @CyclingNinja there are a few issues:

  1. the prop in glue_axes.vue needs to be named value if you set it as value with <glue-axes :value.sync="glue_state"/>
  2. Then you also need to use value in the HTML of glue_axes.vue, e.g: <glue-float-field label="ymax" :value.sync="value.y_max"/>
  3. The watch isn't needed, changes to glue_state are synced automatically
  4. In layer_scatter.vue the tag should start with a lowercase letter <Glue-axes/> should be <glue-axes/>

See: https://github.com/CyclingNinja/glue-jupyter/pull/1/files

@CyclingNinja
Copy link
Contributor Author

Hi @mariobuikhuizen thanks so much for you help, i'll pick this apart so my brain understands it and go forward from there, should be some more things to follow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants