Skip to content

Commit c7de93c

Browse files
fix(widget): use anywidget as base class
Switched `MeshLayer`, `Mesh`, `Volume`, and `Drawing` classes to inherit from `anywidget.AnyWidget` instead of `ipywidgets.Widget` to support marimo. Addresses #137
1 parent 6d5373d commit c7de93c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ipyniivue/widget.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
__all__ = ["NiiVue"]
2727

2828

29-
class MeshLayer(ipywidgets.Widget):
29+
class MeshLayer(anywidget.AnyWidget):
3030
"""
3131
Represents a layer within a Mesh model.
3232
@@ -94,7 +94,7 @@ def _validate_id(self, proposal):
9494
return proposal["value"]
9595

9696

97-
class Mesh(ipywidgets.Widget):
97+
class Mesh(anywidget.AnyWidget):
9898
"""
9999
Represents a Mesh model.
100100
@@ -154,7 +154,7 @@ def _validate_id(self, proposal):
154154
return proposal["value"]
155155

156156

157-
class Volume(ipywidgets.Widget):
157+
class Volume(anywidget.AnyWidget):
158158
"""
159159
Represents a Volume model.
160160
@@ -215,7 +215,7 @@ def _validate_id(self, proposal):
215215
return proposal["value"]
216216

217217

218-
class Drawing(ipywidgets.Widget):
218+
class Drawing(anywidget.AnyWidget):
219219
"""
220220
Represents a Drawing model.
221221

0 commit comments

Comments
 (0)