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:
Diffstat (limited to 'plugins/CoreVisualizations/javascripts/jqplot.js')
-rw-r--r--plugins/CoreVisualizations/javascripts/jqplot.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/CoreVisualizations/javascripts/jqplot.js b/plugins/CoreVisualizations/javascripts/jqplot.js
index 6e5d2135d1..5f51e7e341 100644
--- a/plugins/CoreVisualizations/javascripts/jqplot.js
+++ b/plugins/CoreVisualizations/javascripts/jqplot.js
@@ -178,7 +178,9 @@
// manage resources
target.on('piwikDestroyPlot', function () {
- $(window).off('resize', this._resizeListener);
+ if (this._resizeListener) {
+ $(window).off('resize', this._resizeListener);
+ }
self._plot.destroy();
for (var i = 0; i < $.jqplot.visiblePlots.length; i++) {
if ($.jqplot.visiblePlots[i] == self._plot) {
@@ -385,7 +387,9 @@
// TODO: this code destroys plots when a page is switched. there must be a better way of managing memory.
if (typeof $.jqplot.visiblePlots == 'undefined') {
$.jqplot.visiblePlots = [];
- $('#secondNavBar').on('piwikSwitchPage', function () {
+ var $rootScope = piwikHelper.getAngularDependency('$rootScope');
+
+ $rootScope.$on('piwikPageChange', function () {
for (var i = 0; i < $.jqplot.visiblePlots.length; i++) {
if ($.jqplot.visiblePlots[i] == null) {
continue;
@@ -949,7 +953,7 @@ RowEvolutionSeriesToggle.prototype.beforeReplot = function () {
// legend will be put there
if (this.plugins.canvasLegend.show) {
options.gridPadding = {
- top: 21
+ top: 21, right: 0
};
}