From 2768929c9cbb662ebc0e4d2f498d8410303d0ebe Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Tue, 9 Dec 2014 15:13:24 -0800 Subject: [PATCH] feat(panel/scopes): expand models pane when first scope is selected --- panel/scopes/scopes.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/panel/scopes/scopes.js b/panel/scopes/scopes.js index c886b57..8032c93 100644 --- a/panel/scopes/scopes.js +++ b/panel/scopes/scopes.js @@ -16,6 +16,14 @@ function ScopesController($scope, inspectedApp) { $scope.inspectedScope = null; + // expand models the fist time we inspect a scope + var cancelWatch = $scope.$watch('inspectedScope', function (newScope) { + if (newScope) { + $scope.modelsExpanded = true; + cancelWatch(); + } + }) + $scope.$on('inspected-scope:change', function (ev, data) { inspectScope(data.id); });