diff options
Diffstat (limited to 'tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts')
-rw-r--r-- | tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts b/tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts index 82609e8652..7f6c9ff4b6 100644 --- a/tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts +++ b/tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts @@ -100,11 +100,10 @@ function annotationToClassName(annotationType: render.AnnotationType) { function buildShape(aGroup, a: render.Annotation, sceneBehavior) { if (a.annotationType === tf.graph.render.AnnotationType.SUMMARY) { - let image = scene.selectOrCreateChild(aGroup, "image"); - image.attr({ - "xlink:href": sceneBehavior.resolveUrl("../../lib/svg/summary-icon.svg"), - "height": "12px", - "width": "12px", + let summary = scene.selectOrCreateChild(aGroup, "use"); + summary.attr({ + "class": "summary", + "xlink:href": "#summary-icon", "cursor": "pointer" }); } else { @@ -197,7 +196,7 @@ function update(aGroup, d: render.RenderNodeInformation, a: render.Annotation, // If there is an image, we adjust the location of the image to be vertically // centered with the node and horizontally centered between the arrow and the // text label. - aGroup.select("image").transition().attr({ + aGroup.select("use.summary").transition().attr({ x: d.x + a.dx - 3, y: d.y + a.dy - 6 }); |