diff options
author | Vijay Vasudevan <vrv@google.com> | 2016-06-11 10:45:56 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-06-11 11:49:48 -0700 |
commit | 5a65d43a9e456aac08b32a1d38cbe123d73fcda8 (patch) | |
tree | 2f30b8d138b429b2ac3e436e11a0df4eb5af55ef /tensorflow/tensorboard/components/tf-graph-common/lib/scene | |
parent | f34e3976228e0c15d979786823c83a780eebb212 (diff) |
Merge changes from github.
Change: 124644444
Diffstat (limited to 'tensorflow/tensorboard/components/tf-graph-common/lib/scene')
-rw-r--r-- | tensorflow/tensorboard/components/tf-graph-common/lib/scene/minimap.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tensorflow/tensorboard/components/tf-graph-common/lib/scene/minimap.ts b/tensorflow/tensorboard/components/tf-graph-common/lib/scene/minimap.ts index 76f38814f2..299e536393 100644 --- a/tensorflow/tensorboard/components/tf-graph-common/lib/scene/minimap.ts +++ b/tensorflow/tensorboard/components/tf-graph-common/lib/scene/minimap.ts @@ -267,8 +267,11 @@ export class Minimap { downloadContext.drawImage(image, 0, 0, this.downloadCanvas.width, this.downloadCanvas.height); }; - let blob = new Blob([svgXml], {type: 'image/svg+xml;charset=utf-8'}); - image.src = URL.createObjectURL(blob); + image.onerror = () => { + let blob = new Blob([svgXml], {type: 'image/svg+xml;charset=utf-8'}); + image.src = URL.createObjectURL(blob); + } + image.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svgXml); } /** |