Author:   Lars Michelsen <[email protected]>
Date:     Thu Jun  9 22:31:36 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Thu Jun  9 22:31:36 2011 +0200

Bugfix: Fixed color selection of weathermap lines (Thanks to Laurent Lebatard)

---

 ChangeLog                                          |    2 ++
 .../frontend/nagvis-js/js/NagVisStatefulObject.js  |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 677e982..c2b924a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,10 +9,12 @@ Core
 
 Frontend
   * Labels of objects can now be moved again; The edit mode is affected by the 
objects lock/unlock state
+  * Labels of lines with line_type=14 have more offset now to look better when 
using horizontal lines
   * Bugfix: Added missing controls to services which are displayed as gadgets
   * Bugfix: Fixed parsing of label_type=14 lines (Thanks to Laurent Lebatard)
   * Bugfix: Label positioning in case of weathermap lines (Thanks to Laurent 
Lebatard)
   * Bugfix: Fixed empty warning popups in map management dialogs
+  * Bugfix: Fixed color selection of weathermap lines (Thanks to Laurent 
Lebatard)
 
 1.6b1
 
diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js 
b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
index 5a2a340..ec2b350 100644
--- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
+++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
@@ -647,11 +647,11 @@ var NagVisStatefulObject = NagVisObject.extend({
      */
     getColorFill: function(perc) {
         var ranges = this.conf.line_weather_colors.split(',');
+        // 0 contains the percentage until this color is used
+        // 1 contains the color to be used
         for(var i = 0; i < ranges.length; i++) {
-            // 0 contains the percentage until this color is used
-            // 1 contains the color to be used
             var parts = ranges[i].split(':');
-            if(perc <= parts[0])
+            if(parseInt(perc) <= parts[0])
                 return parts[1];
             parts = null;
         }


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to