SpatialSubsetSelectMixin
- class jdaviz.core.template_mixin.SpatialSubsetSelectMixin(**kwargs)[source] [edit on github]
Bases:
ipyvuetify.VuetifyTemplate.VuetifyTemplate
,glue.core.hub.HubListener
Applies the SubsetSelect component with
allowed_type='spatial'
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 SubsetSelect component instead.Traitlets (available from the plugin):
spatial_subset_items
spatial_subset_selected
spatial_subset_selected_has_subregions
Properties (available from the plugin):
spatial_subset.labels
spatial_subset.selected_obj
To use in a plugin:
add
SpatialSubsetSelectMixin
as a mixin to the classuse the traitlets and properties above as needed (note the prefix for properties)
Example template (label and hint are optional):
<plugin-subset-select :items="spatial_subset_items" :selected.sync="spatial_subset_selected" label="Spatial region" hint="Select spatial region." />
Public constructor
Attributes Summary
An instance of a Python list.
A trait for unicode strings.
A boolean (True, False) trait.
Attributes Documentation
- spatial_subset_items
An instance of a Python list.
- spatial_subset_selected
A trait for unicode strings.
- spatial_subset_selected_has_subregions
A boolean (True, False) trait.