| <!DOCTYPE html> |
| <!-- |
| Copyright 2016 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| |
| <link rel="import" href="/tracing/ui/analysis/analysis_link.html"> |
| |
| <dom-module id="tr-v-ui-related-value-map-span"> |
| <script> |
| 'use strict'; |
| Polymer({ |
| is: 'tr-v-ui-related-value-map-span', |
| |
| ready: function() { |
| this.diagnostic_ = undefined; |
| }, |
| |
| get diagnostic() { |
| return this.diagnostic_; |
| }, |
| |
| set diagnostic(d) { |
| this.diagnostic_ = d; |
| this.updateContents_(); |
| }, |
| |
| updateContents_: function() { |
| Polymer.dom(this).textContent = ''; |
| for (var [name, value] of this.diagnostic) { |
| var link = document.createElement('tr-ui-a-analysis-link'); |
| link.setSelectionAndContent(value, name); |
| Polymer.dom(this).appendChild(link); |
| Polymer.dom(this).appendChild(document.createElement('br')); |
| } |
| } |
| }); |
| </script> |
| </dom-module> |