diff --git a/python/pyproject.toml b/python/pyproject.toml index 7f06827..6bf6af1 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "vizarr" -version = "0.0.1" +version = "0.0.2" dependencies = ["anywidget", "zarr"] [project.optional-dependencies] diff --git a/python/src/vizarr/_widget.js b/python/src/vizarr/_widget.js index ca2377e..8a515e7 100644 --- a/python/src/vizarr/_widget.js +++ b/python/src/vizarr/_widget.js @@ -84,7 +84,7 @@ function get_source(model, source) { */ /** @type {import("npm:@anywidget/types").Render} */ -export function render({ model, el }) { +export async function render({ model, el }) { let div = document.createElement("div"); { div.style.height = model.get("height"); @@ -93,7 +93,7 @@ export function render({ model, el }) { div.style.height = model.get("height"); }); } - let viewer = vizarr.createViewer(div); + let viewer = await vizarr.createViewer(div); { model.on("change:view_state", () => { viewer.setViewState(model.get("view_state"));