Skip to content

Commit

Permalink
Add panel height params back in to fix column panel sizing. Closes #1146
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashid Khan committed May 12, 2014
1 parent 1e12961 commit 0d3e1ca
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/panels/bettermap/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function (angular, app, _, L, localRequire) {
var map, layerGroup;

function render_panel() {
elem.css({height:scope.row.height});
elem.css({height:scope.panel.height||scope.row.height});

scope.require(['./leaflet/plugins'], function () {
scope.panelMeta.loading = false;
Expand Down
5 changes: 3 additions & 2 deletions src/app/panels/goal/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,16 @@ define([
// Function for rendering panel
function render_panel() {
// IE doesn't work without this
elem.css({height:scope.row.height});
elem.css({height:scope.panel.height||scope.row.height});

var label;

label = {
show: scope.panel.labels,
radius: 0,
formatter: function(label, series){
var font = parseInt(scope.row.height.replace('px',''),10)/8 + String('px');
var font = parseInt(
(scope.panel.height||scope.row.height).replace('px',''),10)/8 + String('px');
if(!(_.isUndefined(label))) {
return '<div style="font-size:'+font+';font-weight:bold;text-align:center;padding:2px;color:#fff;">'+
Math.round(series.percent)+'%</div>';
Expand Down
2 changes: 1 addition & 1 deletion src/app/panels/histogram/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, numeral) {
function render_panel(data) {
// IE doesn't work without this
try {
elem.css({height:scope.row.height});
elem.css({height:scope.panel.height||scope.row.height});
} catch(e) {return;}

// Populate from the query service
Expand Down
2 changes: 1 addition & 1 deletion src/app/panels/hits/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ define([
// Function for rendering panel
function render_panel() {
// IE doesn't work without this
elem.css({height:scope.row.height});
elem.css({height:scope.panel.height||scope.row.height});

try {
_.each(scope.data,function(series) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/panels/map/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function (angular, app, _, $) {

function render_panel() {
elem.empty();
elem.css({height:scope.row.height});
elem.css({height:scope.panel.height||scope.row.height});
$('.jvectormap-zoomin,.jvectormap-zoomout,.jvectormap-label').remove();
require(['./panels/map/lib/map.'+scope.panel.map], function () {
elem.vectorMap({
Expand Down
4 changes: 2 additions & 2 deletions src/app/panels/table/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<div class="table-container">

<div bindonce ng-class="{'table-sidebar':panel.field_list}" ng-if="panel.field_list">
<div style="{{panel.overflow}}:{{row.height}};overflow-y:auto">
<div style="{{panel.overflow}}:{{panel.height||row.height}};overflow-y:auto">

<strong>Fields <i class=" icon-chevron-sign-left pointer " ng-click="panel.field_list = !panel.field_list" bs-tooltip="'Hide field list'"></i></strong><p>

Expand Down Expand Up @@ -97,7 +97,7 @@

<div ng-class="{'table-main':panel.field_list}" class="table-doc-table">

<div style="{{panel.overflow}}:{{row.height}};overflow-y:auto">
<div style="{{panel.overflow}}:{{panel.height||row.height}};overflow-y:auto">
<div class="table-facet" ng-if="modalField">
<h4>
<button class="btn btn-mini btn-danger" ng-click="closeFacet();">close</button>
Expand Down
2 changes: 1 addition & 1 deletion src/app/panels/terms/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function (angular, app, _, $, kbn) {
build_results();

// IE doesn't work without this
elem.css({height:scope.row.height});
elem.css({height:scope.panel.height||scope.row.height});

// Make a clone we can operate on.
chartData = _.clone(scope.data);
Expand Down

0 comments on commit 0d3e1ca

Please sign in to comment.