From 293b9806b031652e2ae6d258fd62b1967fda5ee4 Mon Sep 17 00:00:00 2001 From: Sebastien Jourdain Date: Thu, 8 Feb 2018 15:18:06 -0700 Subject: [PATCH] fix(ViewProxy): Add setCornerAnnotations method --- Sources/Proxy/Core/ViewProxy/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Sources/Proxy/Core/ViewProxy/index.js b/Sources/Proxy/Core/ViewProxy/index.js index e9b672daf5a..0f91b1e67b1 100644 --- a/Sources/Proxy/Core/ViewProxy/index.js +++ b/Sources/Proxy/Core/ViewProxy/index.js @@ -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);