| Index: runtime/bin/vmservice/client/lib/src/app/view_model.dart
|
| diff --git a/runtime/bin/vmservice/client/lib/src/app/view_model.dart b/runtime/bin/vmservice/client/lib/src/app/view_model.dart
|
| index 993ff72af02b88f6b3730f5fa6e5e04b49a50264..0b90a993b6ce476d1cf305c2a60e4e2129c9e6b8 100644
|
| --- a/runtime/bin/vmservice/client/lib/src/app/view_model.dart
|
| +++ b/runtime/bin/vmservice/client/lib/src/app/view_model.dart
|
| @@ -11,13 +11,21 @@ abstract class TableTreeRow extends Observable {
|
| @observable final List<String> columns = [];
|
| static const arrowRight = '\u2192';
|
| static const arrowDownRight = '\u21b3';
|
| + static const showExpanderStyle = 'cursor: pointer;';
|
| + static const hideExpanderStyle = 'visibility:hidden;';
|
| +
|
| // TODO(johnmccutchan): Move expander display decisions into html once
|
| // tables and templates are better supported.
|
| @observable String expander = arrowRight;
|
| + @observable String expanderStyle = showExpanderStyle;
|
|
|
| TableTreeRow(TableTreeRow parent) :
|
| parent = parent,
|
| - depth = parent != null ? parent.depth+1 : 0;
|
| + depth = parent != null ? parent.depth+1 : 0 {
|
| + if (!hasChildren()) {
|
| + expanderStyle = hideExpanderStyle;
|
| + }
|
| + }
|
|
|
| bool _expanded = false;
|
| bool get expanded => _expanded;
|
| @@ -41,6 +49,8 @@ abstract class TableTreeRow extends Observable {
|
| return expanded;
|
| }
|
|
|
| + bool hasChildren();
|
| +
|
| /// Fired when the tree row is expanded. Add children rows here.
|
| void onShow();
|
|
|
|
|