Module: nagvis Branch: master Commit: 596c22758cf6a89fea075b1f8225491f2b8cc472 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=596c22758cf6a89fea075b1f8225491f2b8cc472
Author: Lars Michelsen <[email protected]> Date: Mon Oct 4 18:28:14 2010 +0200 #366 The hover area of lines works now as expected again; The context menu for lines has been fixed too --- share/frontend/nagvis-js/js/NagVisLine.js | 2 +- .../frontend/nagvis-js/js/NagVisStatefulObject.js | 4 ++-- share/frontend/nagvis-js/js/lines.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/frontend/nagvis-js/js/NagVisLine.js b/share/frontend/nagvis-js/js/NagVisLine.js index b10419b..acd8bcb 100644 --- a/share/frontend/nagvis-js/js/NagVisLine.js +++ b/share/frontend/nagvis-js/js/NagVisLine.js @@ -119,7 +119,7 @@ var NagVisLine = NagVisStatelessObject.extend({ drawNagVisLine(this.conf.object_id, this.conf.line_type, cuts, x[0], y[0], x[1], y[1], this.conf.z, width, colorFill, colorBorder, ((this.conf.url && this.conf.url !== '') || (this.conf.hover_menu && this.conf.hover_menu !== '')), - this.conf.line_label_show && this.conf.line_label_show === '1'); + (this.conf.line_label_show && this.conf.line_label_show === '1')); }, parseHoverMenu: function () { diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js b/share/frontend/nagvis-js/js/NagVisStatefulObject.js index bf4e56e..ed9bd70 100644 --- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js +++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js @@ -347,7 +347,7 @@ var NagVisStatefulObject = NagVisObject.extend({ // Add a context menu to the object when enabled if(this.conf.context_menu && this.conf.context_menu == '1') { if(this.conf.view_type && this.conf.view_type == 'line') { - this.getContextMenu(this.conf.object_id+'-link'); + this.getContextMenu(this.conf.object_id+'-linelink'); } else { this.getContextMenu(this.conf.object_id+'-icon'); } @@ -582,7 +582,7 @@ var NagVisStatefulObject = NagVisObject.extend({ drawNagVisLine(this.conf.object_id, this.conf.line_type, cuts, x[0], y[0], x[1], y[1], this.conf.z, width, colorFill, colorFill2, setPerfdata, colorBorder, ((this.conf.url && this.conf.url !== '') || (this.conf.hover_menu && this.conf.hover_menu !== '')), - this.conf.line_label_show && this.conf.line_label_show === '1'); + (this.conf.line_label_show && this.conf.line_label_show === '1')); }, /** diff --git a/share/frontend/nagvis-js/js/lines.js b/share/frontend/nagvis-js/js/lines.js index 840f3b0..98826f9 100644 --- a/share/frontend/nagvis-js/js/lines.js +++ b/share/frontend/nagvis-js/js/lines.js @@ -300,7 +300,7 @@ function drawLinkOrLabel(objectId, lineType, x1, y1, x2, y2, z, perfdataA, perfd // First try to create the labels (For weathermap lines only atm) and if none // should be shown try to create link a link area for the line. - if(bLabelShow) + if(bLabelShow && (lineType == 13 || lineType == 14)) drawLabel(objectId, lineType, middle(x1, x2, labelPosition), middle(y1, y2, labelPosition), z, perfdataA, perfdataB); else if(bLinkArea) drawLinkArea(objectId, middle(x1, x2, labelPosition), middle(y1, y2, labelPosition), z); ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
