Skip to content

Commit

Permalink
Merge pull request #573 from Kitware/view-proxy
Browse files Browse the repository at this point in the history
fix(ViewProxy): Add setCornerAnnotations method
  • Loading branch information
jourdain authored Feb 8, 2018
2 parents 38d5e4f + 293b980 commit 2689770
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Sources/Proxy/Core/ViewProxy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,18 @@ function vtkViewProxy(publicAPI, model) {

// --------------------------------------------------------------------------

publicAPI.setCornerAnnotations = (annotations, useTemplateString = false) => {
if (useTemplateString) {
Object.keys(annotations).forEach((key) => {
publicAPI.setCornerAnnotation(key, annotations[key]);
});
} else {
model.cornerAnnotation.updateTemplates(annotations);
}
};

// --------------------------------------------------------------------------

publicAPI.updateCornerAnnotation = (meta) =>
model.cornerAnnotation.updateMetadata(meta);

Expand Down

0 comments on commit 2689770

Please sign in to comment.