small js cleanups

authorSylvain Th?nault <sylvain.thenault@logilab.fr>
changesetaa3679acaa04
branchdefault
phasepublic
hiddenno
parent revision#7da008827c99 consider border width to avoid displaying it when disabled in html. Closes #2527797
child revision#16b889ef09d3 fix broken JQPlotDonutView. Closes #2519158
files modified by this revision
data/cubes.jqplot.ext.js
# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1354227281 -3600
# Thu Nov 29 23:14:41 2012 +0100
# Node ID aa3679acaa04068abcbe11432c5a021ff986258f
# Parent 7da008827c9963488e4c9edd953d4dfb8af331f9
small js cleanups

diff --git a/data/cubes.jqplot.ext.js b/data/cubes.jqplot.ext.js
@@ -1,10 +1,10 @@
1 
2  function buildFloatTickFormatter(precision) {
3      function floatTickFormatter(format, val) {
4 -	var power = Math.pow(10, precision || 0);
5 -	return String(Math.round(val * power) / power);
6 +        var power = Math.pow(10, precision || 0);
7 +        return String(Math.round(val * power) / power);
8      }
9      return floatTickFormatter
10  }
11 
12  floatTickFormatter = buildFloatTickFormatter(1);
@@ -137,11 +137,11 @@
13              }
14              context.fillStyle = $(this).css('background-color');
15              context.fillRect(
16                  offset.left - baseOffset.left,
17                  offset.top - baseOffset.top,
18 -                $(this).width(),$(this).height()
19 +                $(this).width(), $(this).height()
20              );
21          });
22          // add the swatches
23          obj.find("div.jqplot-table-legend-swatch").each(function() {
24              var offset = $(this).offset();