Skip to content

Commit 8f5b5a7

Browse files
authored
Merge pull request #538 from PaulHax/bump-viewer
chore: bump itk-vtk-viewer version
2 parents fbed5d5 + f697deb commit 8f5b5a7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

itkwidgets/viewer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from ._method_types import deferred_methods
1313
from .integrations import _detect_render_type, _get_viewer_image, _get_viewer_point_sets
1414
from .render_types import RenderType
15+
from .viewer_config import ITK_VIEWER_SRC, PYDATA_SPHINX_HREF, MUI_HREF
1516

1617
__all__ = [
1718
"Viewer",
@@ -56,14 +57,14 @@ async def run(self, ctx):
5657
if ui == "pydata-sphinx":
5758
config = {
5859
"uiMachineOptions": {
59-
"href": "https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrapUIMachineOptions.js.es.js",
60+
"href": PYDATA_SPHINX_HREF,
6061
"export": "default",
6162
}
6263
}
6364
elif ui == "mui":
6465
config = {
6566
"uiMachineOptions": {
66-
"href": "https://cdn.jsdelivr.net/npm/[email protected]/dist/materialUIMachineOptions.js.es.js",
67+
"href": MUI_HREF,
6768
"export": "default",
6869
}
6970
}
@@ -93,7 +94,7 @@ async def run(self, ctx):
9394
itk_viewer = await api.createWindow(
9495
name=f"itkwidgets viewer {_viewer_count}",
9596
type="itk-vtk-viewer",
96-
src="https://bafybeicvblbtdzu7u6fdawt3muzd5t436xtbpu7cwdas3p3rcsjktxousq.on.fleek.co/",
97+
src=ITK_VIEWER_SRC,
9798
fullscreen=True,
9899
data=self.init_data,
99100
# config should be a python data dictionary and can't be a string e.g. 'pydata-sphinx',

itkwidgets/viewer_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ITK_VIEWER_SRC = (
2+
"https://bafybeidzxfofr6cwqq6oxsbfwjpfufrf5nuxt56s42kqr6qsjphv5hfpce.on.fleek.co/"
3+
)
4+
PYDATA_SPHINX_HREF = "https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrapUIMachineOptions.js.es.js"
5+
MUI_HREF = "https://cdn.jsdelivr.net/npm/[email protected]/dist/materialUIMachineOptions.js.es.js"

0 commit comments

Comments
 (0)