| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library isolate_summary_element; | 5 library isolate_summary_element; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 import 'observatory_element.dart'; | 8 import 'observatory_element.dart'; |
| 9 import 'package:charted/charted.dart'; | 9 import 'package:charted/charted.dart'; |
| 10 import "package:charted/charts/charts.dart"; | 10 import "package:charted/charts/charts.dart"; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 @published ObservableMap counters; | 91 @published ObservableMap counters; |
| 92 CounterChart chart; | 92 CounterChart chart; |
| 93 | 93 |
| 94 attached() { | 94 attached() { |
| 95 super.attached(); | 95 super.attached(); |
| 96 chart = | 96 chart = |
| 97 new CounterChart(shadowRoot.querySelector('#isolate-counter-chart')); | 97 new CounterChart(shadowRoot.querySelector('#isolate-counter-chart')); |
| 98 } | 98 } |
| 99 | 99 |
| 100 detached() { |
| 101 super.detached(); |
| 102 var host = shadowRoot.querySelector('#isolate-counter-chart-host'); |
| 103 host.children.clear(); |
| 104 var legendHost = |
| 105 shadowRoot.querySelector('#isolate-counter-chart-legend-host'); |
| 106 legendHost.children.clear(); |
| 107 } |
| 108 |
| 100 void countersChanged(oldValue) { | 109 void countersChanged(oldValue) { |
| 101 if (counters == null) { | 110 if (counters == null) { |
| 102 return; | 111 return; |
| 103 } | 112 } |
| 104 if (chart == null) { | 113 if (chart == null) { |
| 105 return; | 114 return; |
| 106 } | 115 } |
| 107 chart.update(counters); | 116 chart.update(counters); |
| 108 } | 117 } |
| 109 } | 118 } |
| OLD | NEW |