Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
keller-mark committed Aug 2, 2024
1 parent 5e61704 commit eb7fc24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .coveragerc_omit
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ omit =
vitessce/data_utils/ome.py
vitessce/data_utils/entities.py
vitessce/data_utils/multivec.py
vitessce/widget_plugins/demo_plugin.py
vitessce/widget_plugins/demo_plugin.py
vitessce/widget_plugins/spatial_query_plugin.py
22 changes: 11 additions & 11 deletions docs/widget_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,21 @@ If defined, these plugin arrays are passed to the Vitessce component as `props <
Passing plugin ESM to the widget
--------------------------------

The plugin string can be passed to the widget using the ``plugin_esm`` parameter:
The plugin string can be passed to the widget using the ``plugins`` parameter and passing a subclass of ``VitesscePlugin``:


.. code-block:: python
from vitessce import VitessceConfig
from vitessce import VitessceConfig, VitesscePlugin
vc = VitessceConfig(
description="A Vitessce widget with a custom plugin",
widget=[
{
"plugin": PLUGIN_ESM,
},
],
)
class MyPlugin(VitesscePlugin):
plugin_esm = PLUGIN_ESM
vc = VitessceConfig(description="A Vitessce widget with a custom plugin")
# Some more configuration here...
vc.widget(plugin_esm=PLUGIN_ESM)
plugin = MyPlugin()
vc.widget(plugins=[plugin])
-------------------------------
Expand Down Expand Up @@ -149,4 +146,7 @@ vitessce.widget_plugins
***********************

.. automodule:: vitessce.widget_plugins.demo_plugin
:members:

.. automodule:: vitessce.widget_plugins.spatial_query
:members:

0 comments on commit eb7fc24

Please sign in to comment.