ViewerSelectMixin

class jdaviz.core.template_mixin.ViewerSelectMixin(**kwargs)[source] [edit on github]

Bases: ipyvuetify.VuetifyTemplate.VuetifyTemplate, glue.core.hub.HubListener

Applies the ViewerSelect component as a mixin in the base plugin. This automatically adds traitlets as well as new properties to the plugin with minimal extra code. For multiple instances or custom traitlet names/defaults, use the SpectralSubsetSelect component instead.

Traitlets (available from the plugin):

  • viewer_items

  • viewer_selected

Properties (available from the plugin):

  • viewer.ids

  • viewer.references

  • viewer.ref_or_ids

  • viewer.selected_item

  • viewer.selected_id

  • viewer.selected_obj

To use in a plugin:

  • add ViewerSelectMixin as a mixin to the class

  • use the traitlets and properties above as needed (note the prefix for properties)

Example template (label and hint are optional):

<v-row>
  <plugin-viewer-select
    :items="viewer_items"
    :selected.sync="viewer_selected"
    label="Viewer"
    hint="Select viewer."
  />
</v-row>

Public constructor

Attributes Summary

viewer_items

An instance of a Python list.

viewer_selected

A trait for unicode strings.

Attributes Documentation

viewer_items

An instance of a Python list.

viewer_selected

A trait for unicode strings.