LayerSelectionSlider

class eomaps.widgets.LayerSelectionSlider(**kwargs: Any)

A slider to select a single visible layer.

For more information on how to customize the widgets, have a look at the documentation for Jupyter Widgets (https://ipywidgets.readthedocs.io).

Parameters:
  • m (eomaps.Maps) – The Maps-object to use.

  • layers (list, optional) –

    A list of layer-names to use. If None, all available layers of the provided Maps-object are used.

    The following options are possible:

    A list of layer-names

    >>> ["layer1", "layer2", ...]
    

    A list of layer-names and/or layer-names with transparency-assignments

    >>> ["layer1", "layer2", ("layer", 0.4)]
    

    To provide explict display-names for a layer, pass a list of the form [display-name, <layer-assignment>]

    >>> [["My Layer", "layer1"],
    >>>  ["My secondl lyer", "layer2"],
    >>>  ["Multiple layers", ("layer1",
    >>>                       ("layer", 0.4))]
    >>> ]
    

Members

add_class

Adds a class to the top level element of the widget.

add_traits

Dynamically add trait attributes to the Widget.

behavior

Slider dragging behavior.

blur

Blur the widget.

change_handler

class_own_trait_events

Get a dict of all event handlers defined on this class, not a parent.

class_own_traits

Get a dict of all the traitlets defined on this class, not a parent.

class_trait_names

Get a list of all the names of this class' traits.

class_traits

Get a dict of all the traits of this class.

close

Close method.

close_all

comm

A trait which allows any value.

continuous_update

Update the value of the widget as the user is holding the slider.

cross_validation_lock

A contextmanager for running a block with our cross validation lock set to True.

description

Description of the control.

description_allow_html

Accept HTML in the description.

description_tooltip

The tooltip information. .. deprecated :: 8.0.0 Use tooltip attribute instead.

disabled

Enable or disable user changes

focus

Focus on the widget.

get_interact_value

Return the value for this widget which should be passed to interactive functions.

get_manager_state

Returns the full state for a widget manager for embedding

get_state

Gets the widget state, or a piece of it.

get_view_spec

handle_comm_opened

Static method, called when a widget is constructed.

handle_control_comm_opened

Class method, called when the comm-open message on the "jupyter.widget.control" comm channel is received

has_trait

Returns True if the object has a trait with the specified name.

hold_sync

Hold syncing any state until the outermost context manager exits

hold_trait_notifications

Context manager for bundling trait change notifications and cross validation.

index

Selected index

keys

The traits which are synced.

label

Selected label

layout

An instance trait which coerces a dict to an instance.

log

A trait whose value must be an instance of a specified class.

model_id

Gets the model id of this widget.

notify_change

Called when a property has changed.

observe

Setup a handler to be called when a trait changes.

on_msg

(Un)Register a custom msg receive callback.

on_trait_change

DEPRECATED: Setup a handler to be called when a trait changes.

on_widget_constructed

Registers a callback to be called when a widget is constructed.

open

Open a comm to the frontend if one isn't already open.

options

Iterable of values, (label, value) pairs, or Mapping between labels and values that the user can select.

orientation

Vertical or horizontal.

readout

Display the current selected label next to the slider

remove_class

Removes a class from the top level element of the widget.

send

Sends a custom msg to the widget model in the front-end.

send_state

Sends the widget state, or a piece of it, to the front-end, if it exists.

set_state

Called when a state is received from the front-end.

set_trait

Forcibly sets trait attribute, including read-only attributes.

setup_instance

This is called before self.__init__ is called.

style

An instance trait which coerces a dict to an instance.

tabbable

Is widget tabbable?

tooltip

A tooltip caption.

trait_defaults

Return a trait's default value or a dictionary of them

trait_events

Get a dict of all the event handlers of this class.

trait_has_value

Returns True if the specified trait has a value.

trait_metadata

Get metadata values for trait by key.

trait_names

Get a list of all the names of this class' traits.

trait_values

A dict of trait names and their values.

traits

Get a dict of all the traits of this class.

unobserve

Remove a trait change handler.

unobserve_all

Remove trait change handlers of any type for the specified name.

value

Selected value

widget_types

widgets