diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-10-18 02:15:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 02:15:08 +0300 |
commit | 261a77a09be0c6e3a50efd2f6f1a509a9ce20d31 (patch) | |
tree | f0cf81ab99d501275db6bca19e3b4bd2e211889d /plugins | |
parent | 5bedd0275fefc07053481eacb1bed9eb89a81870 (diff) |
Ensure empty tables also use max width (#19822)
* Ensure empty tables also use max width
* avoid resizing evolution charts
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreHome/javascripts/dataTable.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index 95444fa5df..149e23618b 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -421,13 +421,17 @@ $.extend(DataTable.prototype, UIControl.prototype, { var dataTableInCard = $domElem.parents('.card').first(); var parentDataTable = $domElem.parent('.dataTable'); + if ($domElem.is('.dataTableVizEvolution,.dataTableVizStackedBarEvolution')) { + return; // don't resize evolution charts + } + dataTableInCard.width(''); $domElem.width(''); parentDataTable.width(''); var tableWidth = getTableWidth(domElem); - if (tableWidth <= maxTableWidth) { + if (tableWidth <= maxTableWidth && tableWidth > 0) { return; } |