Commit fc1e4094 authored by David Schnur's avatar David Schnur

Fixed style violations introduced by 0.8.2 merge.

parent 3035aaae
...@@ -1489,8 +1489,8 @@ Licensed under the MIT license. ...@@ -1489,8 +1489,8 @@ Licensed under the MIT license.
// from a previous plot in this container that we'll try to re-use. // from a previous plot in this container that we'll try to re-use.
placeholder.css("padding", 0) // padding messes up the positioning placeholder.css("padding", 0) // padding messes up the positioning
.children().filter(function(){ .children().filter(function() {
return !$(this).hasClass("flot-overlay") && !$(this).hasClass('flot-base'); return !$(this).hasClass("flot-overlay") && !$(this).hasClass("flot-base");
}).remove(); }).remove();
if (placeholder.css("position") === "static") { if (placeholder.css("position") === "static") {
...@@ -1742,7 +1742,7 @@ Licensed under the MIT license. ...@@ -1742,7 +1742,7 @@ Licensed under the MIT license.
if (minMargin == null) { if (minMargin == null) {
minMargin = 0; minMargin = 0;
for (var i = 0; i < series.length; ++i) { for (var i = 0; i < series.length; ++i) {
minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2)); minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth / 2));
} }
} }
...@@ -1798,7 +1798,7 @@ Licensed under the MIT license. ...@@ -1798,7 +1798,7 @@ Licensed under the MIT license.
// If the grid is visible, add its border width to the offset // If the grid is visible, add its border width to the offset
for (a in plotOffset) { for (a in plotOffset) {
if(typeof(options.grid.borderWidth) === "object") { if (typeof(options.grid.borderWidth) === "object") {
plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0; plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;
} else { } else {
plotOffset[a] += showGrid ? options.grid.borderWidth : 0; plotOffset[a] += showGrid ? options.grid.borderWidth : 0;
...@@ -2325,7 +2325,7 @@ Licensed under the MIT license. ...@@ -2325,7 +2325,7 @@ Licensed under the MIT license.
// If either borderWidth or borderColor is an object, then draw the border // If either borderWidth or borderColor is an object, then draw the border
// line by line instead of as one rectangle // line by line instead of as one rectangle
bc = options.grid.borderColor; bc = options.grid.borderColor;
if(typeof bw === "object" || typeof bc === "object") { if (typeof bw === "object" || typeof bc === "object") {
if (typeof bw !== "object") { if (typeof bw !== "object") {
bw = {top: bw, right: bw, bottom: bw, left: bw}; bw = {top: bw, right: bw, bottom: bw, left: bw};
} }
...@@ -2337,8 +2337,8 @@ Licensed under the MIT license. ...@@ -2337,8 +2337,8 @@ Licensed under the MIT license.
ctx.strokeStyle = bc.top; ctx.strokeStyle = bc.top;
ctx.lineWidth = bw.top; ctx.lineWidth = bw.top;
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(0 - bw.left, 0 - bw.top/2); ctx.moveTo(0 - bw.left, 0 - bw.top / 2);
ctx.lineTo(plotWidth, 0 - bw.top/2); ctx.lineTo(plotWidth, 0 - bw.top / 2);
ctx.stroke(); ctx.stroke();
} }
...@@ -2364,14 +2364,14 @@ Licensed under the MIT license. ...@@ -2364,14 +2364,14 @@ Licensed under the MIT license.
ctx.strokeStyle = bc.left; ctx.strokeStyle = bc.left;
ctx.lineWidth = bw.left; ctx.lineWidth = bw.left;
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom); ctx.moveTo(0 - bw.left / 2, plotHeight + bw.bottom);
ctx.lineTo(0- bw.left/2, 0); ctx.lineTo(0- bw.left / 2, 0);
ctx.stroke(); ctx.stroke();
} }
} else { } else {
ctx.lineWidth = bw; ctx.lineWidth = bw;
ctx.strokeStyle = options.grid.borderColor; ctx.strokeStyle = options.grid.borderColor;
ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw); ctx.strokeRect(-bw / 2, -bw / 2, plotWidth + bw, plotHeight + bw);
} }
} }
...@@ -2825,10 +2825,10 @@ Licensed under the MIT license. ...@@ -2825,10 +2825,10 @@ Licensed under the MIT license.
ctx.lineWidth = sw; ctx.lineWidth = sw;
ctx.strokeStyle = "rgba(0,0,0,0.1)"; ctx.strokeStyle = "rgba(0,0,0,0.1)";
// position shadow at angle from the mid of line // position shadow at angle from the mid of line
var angle = Math.PI/18; var angle = Math.PI / 18;
plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis); plotLine(series.datapoints, Math.sin(angle) * (lw / 2 + sw / 2), Math.cos(angle) * (lw / 2 + sw / 2), series.xaxis, series.yaxis);
ctx.lineWidth = sw/2; ctx.lineWidth = sw / 2;
plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis); plotLine(series.datapoints, Math.sin(angle) * (lw / 2 + sw / 4), Math.cos(angle) * (lw / 2 + sw / 4), series.xaxis, series.yaxis);
} }
ctx.lineWidth = lw; ctx.lineWidth = lw;
...@@ -2886,7 +2886,7 @@ Licensed under the MIT license. ...@@ -2886,7 +2886,7 @@ Licensed under the MIT license.
// Doing the conditional here allows the shadow setting to still be // Doing the conditional here allows the shadow setting to still be
// optional even with a lineWidth of 0. // optional even with a lineWidth of 0.
if( lw === 0 ) { if (lw === 0) {
lw = 0.0001; lw = 0.0001;
} }
...@@ -2895,11 +2895,11 @@ Licensed under the MIT license. ...@@ -2895,11 +2895,11 @@ Licensed under the MIT license.
var w = sw / 2; var w = sw / 2;
ctx.lineWidth = w; ctx.lineWidth = w;
ctx.strokeStyle = "rgba(0,0,0,0.1)"; ctx.strokeStyle = "rgba(0,0,0,0.1)";
plotPoints(series.datapoints, radius, null, w + w/2, true, plotPoints(series.datapoints, radius, null, w + w / 2, true,
series.xaxis, series.yaxis, symbol); series.xaxis, series.yaxis, symbol);
ctx.strokeStyle = "rgba(0,0,0,0.2)"; ctx.strokeStyle = "rgba(0,0,0,0.2)";
plotPoints(series.datapoints, radius, null, w/2, true, plotPoints(series.datapoints, radius, null, w / 2, true,
series.xaxis, series.yaxis, symbol); series.xaxis, series.yaxis, symbol);
} }
...@@ -2987,7 +2987,7 @@ Licensed under the MIT license. ...@@ -2987,7 +2987,7 @@ Licensed under the MIT license.
// fill the bar // fill the bar
if (fillStyleCallback) { if (fillStyleCallback) {
c.fillStyle = fillStyleCallback(bottom, top); c.fillStyle = fillStyleCallback(bottom, top);
c.fillRect(left, top, right - left, bottom - top) c.fillRect(left, top, right - left, bottom - top);
} }
// draw outline // draw outline
...@@ -2996,22 +2996,26 @@ Licensed under the MIT license. ...@@ -2996,22 +2996,26 @@ Licensed under the MIT license.
// FIXME: inline moveTo is buggy with excanvas // FIXME: inline moveTo is buggy with excanvas
c.moveTo(left, bottom); c.moveTo(left, bottom);
if (drawLeft) if (drawLeft) {
c.lineTo(left, top); c.lineTo(left, top);
else } else {
c.moveTo(left, top); c.moveTo(left, top);
if (drawTop) }
if (drawTop) {
c.lineTo(right, top); c.lineTo(right, top);
else } else {
c.moveTo(right, top); c.moveTo(right, top);
if (drawRight) }
if (drawRight) {
c.lineTo(right, bottom); c.lineTo(right, bottom);
else } else {
c.moveTo(right, bottom); c.moveTo(right, bottom);
if (drawBottom) }
if (drawBottom) {
c.lineTo(left, bottom); c.lineTo(left, bottom);
else } else {
c.moveTo(left, bottom); c.moveTo(left, bottom);
}
c.stroke(); c.stroke();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment