From d1b7df68172b6f4a2fe15cd87b941aebe368d899 Mon Sep 17 00:00:00 2001 From: kunw Date: Mon, 27 Jun 2016 14:33:31 +0800 Subject: [PATCH] update for auto-resizing of element-height inspector. --- static/resources/css/index.css | 1 + .../components/element-height/element-height.inspector.js | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/static/resources/css/index.css b/static/resources/css/index.css index e31a3d5b8..ee9605207 100644 --- a/static/resources/css/index.css +++ b/static/resources/css/index.css @@ -32,6 +32,7 @@ body { .container-fluid-custom { background-color: #EFEFEF; width: 100%; + height: 100%; min-width: 1px; overflow: auto; min-height: 1px; diff --git a/static/resources/js/components/element-height/element-height.inspector.js b/static/resources/js/components/element-height/element-height.inspector.js index 2f063f54b..603ac8f24 100644 --- a/static/resources/js/components/element-height/element-height.inspector.js +++ b/static/resources/js/components/element-height/element-height.inspector.js @@ -23,15 +23,13 @@ if(!angular.isDefined(scope.subsHeight)) scope.subsHeight = 110; if(!angular.isDefined(scope.subsSection)) scope.subsSection = 32; if(!angular.isDefined(scope.subsSubPane)) scope.subsSubPane = 226; - if(!angular.isDefined(scope.subsTabPane)) scope.subsTabPane = 66; scope.$watch(scope.getDimension, function(current) { if(current) { - var h = current.h; - element.css({'height' : (h - scope.subsHeight) + 'px'}); + var h = current.h; element.find('.section').css({'height': (h - scope.subsHeight - scope.subsSection) + 'px'}); element.find('.sub-pane').css({'height': (h - scope.subsHeight - scope.subsSubPane) + 'px'}); - element.find('.tab-pane').css({'height': (h - scope.subsHeight - scope.subsTabPane) + 'px'}); + element.find('.tab-pane').css({'height': (h - scope.subsHeight - scope.subsSubPane) + 'px'}); } }, true);