From e0f4c28d3d086ea732fee0bed93729a7e1346be7 Mon Sep 17 00:00:00 2001 From: jgould Date: Thu, 14 Jul 2016 11:01:32 -0400 Subject: [PATCH] focus option --- src/ui/heat_map.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/heat_map.js b/src/ui/heat_map.js index 3cf97ee..dcabbf9 100644 --- a/src/ui/heat_map.js +++ b/src/ui/heat_map.js @@ -180,6 +180,8 @@ morpheus.HeatMap = function (options) { width: undefined, // set the available width for the // heat map. If not // set, it will be determined automatically + /** Whether to focus this tab */ + focus: true, inheritFromParent: true, inheritFromParentOptions: { transpose: false @@ -309,7 +311,7 @@ morpheus.HeatMap = function (options) { rename: true, title: this.options.name, object: this, - focus: true + focus: this.options.focus }); if (options.$loadingImage) { options.$loadingImage.appendTo(this.$content); @@ -388,7 +390,9 @@ morpheus.HeatMap = function (options) { options.loadedCallback(_this); } - _this.tabManager.setActiveTab(tab.id); + if (_this.options.focus) { + _this.tabManager.setActiveTab(tab.id); + } _this.$el.trigger('heatMapLoaded', _this); }; if (morpheus.Util.isArray(options.dataset)) { -- GitLab