Author: Lars Michelsen <[email protected]>
Date: Mon Oct 1 15:12:03 2012 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Mon Oct 1 15:12:03 2012 +0200
Bugfix: Zoom code: Catching invalid font-size declarations
---
ChangeLog | 1 +
share/frontend/nagvis-js/js/nagvis.js | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fca0f8f..990375e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ Core:
Frontend:
* Bugfix: Fixed broken rotation links on overview page
+ * Bugfix: Zoom code: Catching not handleable font-size declarations
1.7.1
Core
diff --git a/share/frontend/nagvis-js/js/nagvis.js
b/share/frontend/nagvis-js/js/nagvis.js
index 51b26a7..9da3a1d 100644
--- a/share/frontend/nagvis-js/js/nagvis.js
+++ b/share/frontend/nagvis-js/js/nagvis.js
@@ -1059,8 +1059,17 @@ function drawNagVisTextbox(oContainer, id, className,
bgColor, borderColor, x, y
"Unable to fetch font-size attribute for textbox"
);
} else {
- var fontSize = parseInt(fontSize.replace('px', ''));
- oLabelSpan.style.fontSize = addZoomFactor(fontSize) + 'px';
+ // Only take zoom into account if the fontSize is set in px
+ if(fontSize.indexOf('px') !== -1) {
+ var fontSize = parseInt(fontSize.replace('px', ''));
+ oLabelSpan.style.fontSize = addZoomFactor(fontSize) + 'px';
+ } else {
+ eventlog(
+ "drawNagVisTextbox",
+ "critical",
+ "Zoom: Can not handle this font-size declaration (" +
fontSize + ")"
+ );
+ }
}
}
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins