Skip to content

Commit

Permalink
Stupid event dispatch mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
PrafulB committed Aug 31, 2023
1 parent 02e292e commit 8c01f0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/modelWorkerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ const insertWSIDataToIndexedDB = (data, annotationId) => new Promise (async reso
})
transaction.oncomplete = ({target}) => resolve(target.result)
} else {
transaction.objectStore(`${indexedDBConfig['wsi'].objectStoreNamePrefix}_${annotationId}`).put(row).onsuccess = ({target}) => resolve(target.result)
transaction.objectStore(`${indexedDBConfig['wsi'].objectStoreNamePrefix}_${annotationId}`).put(data).onsuccess = ({target}) => resolve(target.result)
}
}
})
Expand Down
4 changes: 2 additions & 2 deletions scripts/wsi.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ wsi.loadImage = async (id, name, fileMetadata={}) => {
}
if (!wsiPredsFileId) {
wsi.getPreviousPredsFromBox(fileMetadata)
path.wsiViewer.addEventListener("previousPredsReady", (e) => {
path.wsiViewer.element.addEventListener("previousPredsReady", (e) => {
e.preventDefault()
wsiPredsFileId = e.detail.wsiPredsFileId
wsi.startPrediction(annotationId, imageId, name, width, height, predictionBounds, wsiPredsFileId)
Expand Down Expand Up @@ -1254,7 +1254,7 @@ wsi.handleMessage = (data, op) => {
'wsiPredsFileId': JSON.parse(data.newFileMetadata.wsiPredsFiles).find(file => file.annotationId === data.annotationId && file.modelId === data.modelId).fileId
}
})
path.wsiViewer.dispatchEvent(previousPredsReadyEvent)
path.wsiViewer.element.dispatchEvent(previousPredsReadyEvent)
}
wsi.overlayPreviousPredictions()
annotations.populateWSIAnnotations(true, true)
Expand Down

0 comments on commit 8c01f0a

Please sign in to comment.