Skip to content

Commit

Permalink
feat(python): Use async API
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed Feb 2, 2024
1 parent 0d7abd8 commit 5632a78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions python/src/vizarr/_widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function get_source(model, source) {
*/

/** @type {import("npm:@anywidget/types").Render<Model>} */
export function render({ model, el }) {
export async function render({ model, el }) {
let div = document.createElement("div");
{
div.style.height = model.get("height");
Expand All @@ -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"));
Expand Down

0 comments on commit 5632a78

Please sign in to comment.