algairim commented on a change in pull request #210:
URL: https://github.com/apache/brooklyn-ui/pull/210#discussion_r643750100



##########
File path: ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
##########
@@ -670,6 +685,46 @@ export function D3Blueprint(container, options) {
             .attr('transform', 'scale(0)')
             .remove();
         appendElement(adjunctData.enter(), 'rect', 
_configHolder.nodes.adjunct.rect);
+
+        let annotationElement = nodeGroup.append('g')
+            .attr('class', 'node-annotation');
+        let annotationData = nodeData.select('g.node-annotation')
+            .selectAll('foreignObject.node-annotation')
+            .data((d)=>{
+                let tags = d.data.metadata && 
d.data.metadata.get("brooklyn.tags");
+                if (tags) {
+                    let annotations = tags.map(tag => typeof tag === "object" 
&& Object.keys(tag) && Object.keys(tag).length === 1 && 
tag["ui-composer-annotation"]).filter(x => x);

Review comment:
       Is `filter` at the end required? Looks like annotations could be 
retrieved using `filter` alone, instead of map.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to