From 6a9f71f70ebe7748d4b15c9ec4decd66b21937bb Mon Sep 17 00:00:00 2001 From: Benjamin Gram Date: Tue, 29 Oct 2013 16:14:47 -0700 Subject: [PATCH] fix label's maxWidth calculation --- jquery.flot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.flot.js b/jquery.flot.js index 2855d2e..67edfae 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -1347,7 +1347,7 @@ Licensed under the MIT license. ticks = axis.ticks || [], labelWidth = opts.labelWidth || 0, labelHeight = opts.labelHeight || 0, - maxWidth = labelWidth || axis.direction == "x" ? Math.floor(surface.width / (ticks.length || 1)) : null, + maxWidth = labelWidth || (axis.direction == "x" ? Math.floor(surface.width / (ticks.length || 1)) : null), legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis", layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles, font = opts.font || "flot-tick-label tickLabel";