Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2022-10-18 02:15:08 +0300
committerGitHub <noreply@github.com>2022-10-18 02:15:08 +0300
commit261a77a09be0c6e3a50efd2f6f1a509a9ce20d31 (patch)
treef0cf81ab99d501275db6bca19e3b4bd2e211889d
parent5bedd0275fefc07053481eacb1bed9eb89a81870 (diff)
Ensure empty tables also use max width (#19822)
* Ensure empty tables also use max width * avoid resizing evolution charts
-rw-r--r--plugins/CoreHome/javascripts/dataTable.js6
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;
}