Skip to content

Commit

Permalink
fix(ViewProxy): Return Promise from openCaptureImage
Browse files Browse the repository at this point in the history
So the caller can know when the capture is complete.
  • Loading branch information
thewtex committed Jul 6, 2020
1 parent cae2f3b commit d2a353c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Proxy/Core/ViewProxy/index.js
Expand Up @@ -259,7 +259,7 @@ function vtkViewProxy(publicAPI, model) {

publicAPI.openCaptureImage = (target = '_blank') => {
const image = new Image();
publicAPI.captureImage().then((imageURL) => {
return publicAPI.captureImage().then((imageURL) => {
image.src = imageURL;
const w = window.open('', target);
w.document.write(image.outerHTML);
Expand Down

0 comments on commit d2a353c

Please sign in to comment.