Skip to content

Commit

Permalink
feat(Sources/Filters/General/PaintFilter/index.js): Return the promis…
Browse files Browse the repository at this point in the history
…e generated by workerPromise.ex
  • Loading branch information
JamesAPetts committed Sep 18, 2019
1 parent 8d8a543 commit 0c470bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sources/Filters/General/PaintFilter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ function vtkPaintFilter(publicAPI, model) {
// --------------------------------------------------------------------------

publicAPI.endStroke = () => {
let endStrokePromise;

if (workerPromise) {
workerPromise.exec('end').then((strokeBuffer) => {
endStrokePromise = workerPromise.exec('end');

endStrokePromise.then((strokeBuffer) => {
const scalars = model.labelMap.getPointData().getScalars();
const data = scalars.getData();

Expand Down Expand Up @@ -113,6 +117,8 @@ function vtkPaintFilter(publicAPI, model) {
publicAPI.modified();
});
}

return endStrokePromise;
};

// --------------------------------------------------------------------------
Expand Down

0 comments on commit 0c470bc

Please sign in to comment.