From 162977906265df2782845a092707f7176a6d5a45 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Sat, 2 Jul 2016 17:29:07 +0200 Subject: Customizable titles on health map and sticky panes Click a field in a switch summary and the health map will use it as a legend, assuming it isn't already showing information. And remember what panel was used last when browsing switches. --- web/js/nms-map.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web/js/nms-map.js') diff --git a/web/js/nms-map.js b/web/js/nms-map.js index f95cde5..5669acb 100644 --- a/web/js/nms-map.js +++ b/web/js/nms-map.js @@ -114,6 +114,11 @@ nmsMap.reset = function() { }; nmsMap.setSwitchInfo = function(sw,info) { + if (info != undefined) { + var textl = info.length; + if (textl > 15) + info = info.slice(0,15); + } if (this._info[sw] != info) { this._info[sw] = info; this._drawSwitchInfo(sw); -- cgit v1.2.3