Skip to content

Commit

Permalink
Merge pull request #538 from PaulHax/bump-viewer
Browse files Browse the repository at this point in the history
chore: bump itk-vtk-viewer version
  • Loading branch information
thewtex authored Sep 26, 2022
2 parents fbed5d5 + f697deb commit 8f5b5a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions itkwidgets/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ._method_types import deferred_methods
from .integrations import _detect_render_type, _get_viewer_image, _get_viewer_point_sets
from .render_types import RenderType
from .viewer_config import ITK_VIEWER_SRC, PYDATA_SPHINX_HREF, MUI_HREF

__all__ = [
"Viewer",
Expand Down Expand Up @@ -56,14 +57,14 @@ async def run(self, ctx):
if ui == "pydata-sphinx":
config = {
"uiMachineOptions": {
"href": "https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrapUIMachineOptions.js.es.js",
"href": PYDATA_SPHINX_HREF,
"export": "default",
}
}
elif ui == "mui":
config = {
"uiMachineOptions": {
"href": "https://cdn.jsdelivr.net/npm/[email protected]/dist/materialUIMachineOptions.js.es.js",
"href": MUI_HREF,
"export": "default",
}
}
Expand Down Expand Up @@ -93,7 +94,7 @@ async def run(self, ctx):
itk_viewer = await api.createWindow(
name=f"itkwidgets viewer {_viewer_count}",
type="itk-vtk-viewer",
src="https://bafybeicvblbtdzu7u6fdawt3muzd5t436xtbpu7cwdas3p3rcsjktxousq.on.fleek.co/",
src=ITK_VIEWER_SRC,
fullscreen=True,
data=self.init_data,
# config should be a python data dictionary and can't be a string e.g. 'pydata-sphinx',
Expand Down
5 changes: 5 additions & 0 deletions itkwidgets/viewer_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ITK_VIEWER_SRC = (
"https://bafybeidzxfofr6cwqq6oxsbfwjpfufrf5nuxt56s42kqr6qsjphv5hfpce.on.fleek.co/"
)
PYDATA_SPHINX_HREF = "https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrapUIMachineOptions.js.es.js"
MUI_HREF = "https://cdn.jsdelivr.net/npm/[email protected]/dist/materialUIMachineOptions.js.es.js"

0 comments on commit 8f5b5a7

Please sign in to comment.