Browse Source

A user reported that Opera doesnt understand height="0.xxx", so we round
this up to 1.0

Morten Brix Pedersen 25 years ago
parent
commit
bdc3827708
1 changed files with 7 additions and 0 deletions
  1. 7 0
      pisg.pl

+ 7 - 0
pisg.pl

@@ -1105,6 +1105,13 @@ sub activetimes
         my $size = ($times{$hour} / $highest_value) * 100;
         my $percent = ($times{$hour} / $lines) * 100;
         $percent =~ s/(\.\d)\d+/$1/;
+        
+        if ($size < 1 && $size != 0) {
+            # Opera doesn't understand '0.xxxx' in the height="xx" attr,
+            # so we simply round up to 1.0 here.
+
+            $size = 1.0;
+        }
 
         if ($conf->{timeoffset} =~ /\+(\d+)/) {
             # We must plus some hours to the time