Skip to content

Commit

Permalink
Revert "Remove unneeded await for call to synchronous browser.getUser…
Browse files Browse the repository at this point in the history
…DefinedROIs()"

This reverts commit ebf8751.
  • Loading branch information
jrobinso committed Jul 24, 2024
1 parent 6c7bcb4 commit 40e655c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dev/roi/roi-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3>User defined ROIs:</h3>
const list = document.createElement("ul")
div.appendChild(list)

const rois = browser.getUserDefinedROIs()
const rois = await browser.getUserDefinedROIs()
if (rois) {
for (let r of rois) {
const li = document.createElement('li')
Expand Down
4 changes: 2 additions & 2 deletions examples/roi/roi-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3>User defined ROIs:</h3>

<script type="module">

import igv from "../../js/index.js"
import igv from "../../dist/igv.esm.min.js"

const browser_config =
{
Expand Down Expand Up @@ -76,7 +76,7 @@ <h3>User defined ROIs:</h3>
const list = document.createElement("ul")
div.appendChild(list)

const rois = browser.getUserDefinedROIs()
const rois = await browser.getUserDefinedROIs()
if (rois) {
for (let r of rois) {
const li = document.createElement('li')
Expand Down
2 changes: 1 addition & 1 deletion js/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ class Browser {
}

/**
* Public API function. Return list of user-defined regions-of-interest
* Public API function. Return a promise for the list of user-defined regions-of-interest
*/
async getUserDefinedROIs() {

Expand Down

0 comments on commit 40e655c

Please sign in to comment.