OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:html'; | 5 import 'dart:html'; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:observatory/models.dart' as M; | 7 import 'package:observatory/models.dart' as M; |
8 import 'package:observatory/src/elements/curly_block.dart'; | 8 import 'package:observatory/src/elements/curly_block.dart'; |
9 import 'package:observatory/src/elements/instance_ref.dart'; | 9 import 'package:observatory/src/elements/instance_ref.dart'; |
10 import 'package:observatory/src/elements/helpers/any_ref.dart'; | 10 import 'package:observatory/src/elements/helpers/any_ref.dart'; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 @override | 60 @override |
61 void detached() { | 61 void detached() { |
62 super.detached(); | 62 super.detached(); |
63 children = []; | 63 children = []; |
64 _r.disable(notify: true); | 64 _r.disable(notify: true); |
65 } | 65 } |
66 | 66 |
67 void render() { | 67 void render() { |
68 children = [ | 68 children = [ |
69 new CurlyBlockElement(expanded: _expanded, queue: _r.queue) | 69 new CurlyBlockElement(expanded: _expanded, queue: _r.queue) |
70 ..children = _createContent() | 70 ..content = _createContent() |
71 ..onToggle.listen((e) async { | 71 ..onToggle.listen((e) async { |
72 _expanded = e.control.expanded; | 72 _expanded = e.control.expanded; |
73 if (_expanded) { | 73 if (_expanded) { |
74 e.control.disabled = true; | 74 e.control.disabled = true; |
75 await _refresh(); | 75 await _refresh(); |
76 e.control.disabled = false; | 76 e.control.disabled = false; |
77 } | 77 } |
78 }) | 78 }) |
79 ]; | 79 ]; |
80 } | 80 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 anyRef(_isolate, reference.source, _instances, queue: _r.queue), | 117 anyRef(_isolate, reference.source, _instances, queue: _r.queue), |
118 new SpanElement()..text = ' referenced by ', | 118 new SpanElement()..text = ' referenced by ', |
119 new InboundReferencesElement(_isolate, reference.source, _references, | 119 new InboundReferencesElement(_isolate, reference.source, _references, |
120 _instances, queue: _r.queue ) | 120 _instances, queue: _r.queue ) |
121 ]); | 121 ]); |
122 | 122 |
123 return new DivElement()..classes = ['indent'] | 123 return new DivElement()..classes = ['indent'] |
124 ..children = content; | 124 ..children = content; |
125 } | 125 } |
126 } | 126 } |
OLD | NEW |