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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 @override | 63 @override |
64 void detached() { | 64 void detached() { |
65 super.detached(); | 65 super.detached(); |
66 children = []; | 66 children = []; |
67 _r.disable(notify: true); | 67 _r.disable(notify: true); |
68 } | 68 } |
69 | 69 |
70 void render() { | 70 void render() { |
71 children = [ | 71 children = [ |
72 new CurlyBlockElement(expanded: _expanded, queue: _r.queue) | 72 new CurlyBlockElement(expanded: _expanded, queue: _r.queue) |
73 ..children = [ | 73 ..content = [ |
74 new DivElement()..classes = ['memberList'] | 74 new DivElement()..classes = ['memberList'] |
75 ..children = _createContent() | 75 ..children = _createContent() |
76 ] | 76 ] |
77 ..onToggle.listen((e) async { | 77 ..onToggle.listen((e) async { |
78 _expanded = e.control.expanded; | 78 _expanded = e.control.expanded; |
79 if (_expanded) { | 79 if (_expanded) { |
80 e.control.disabled = true; | 80 e.control.disabled = true; |
81 await _refresh(); | 81 await _refresh(); |
82 e.control.disabled = false; | 82 e.control.disabled = false; |
83 } | 83 } |
(...skipping 19 matching lines...) Expand all Loading... |
103 new DivElement()..classes = ['memberName'] | 103 new DivElement()..classes = ['memberName'] |
104 ..text = '${Utils.formatSize(r.retainedSize)} ', | 104 ..text = '${Utils.formatSize(r.retainedSize)} ', |
105 new DivElement()..classes = ['memberValue'] | 105 new DivElement()..classes = ['memberValue'] |
106 ..children = [ | 106 ..children = [ |
107 anyRef(_isolate, r.object, _instances, queue: _r.queue) | 107 anyRef(_isolate, r.object, _instances, queue: _r.queue) |
108 ] | 108 ] |
109 ] | 109 ] |
110 ).toList(); | 110 ).toList(); |
111 } | 111 } |
112 } | 112 } |
OLD | NEW |