Always remove the tick text in drawAxisLabels() regardless of axis settings.

Since a plot may be redrawn after removing ticks or hiding the axis,
the tick text should always be removed before determining if there are
ticks to draw.
master
Mark Côté 13 years ago
parent 81926d033d
commit 5a0372159a

@ -2100,9 +2100,6 @@ Licensed under the MIT license.
function drawAxisLabels() {
$.each(allAxes(), function (_, axis) {
if (!axis.show || axis.ticks.length == 0)
return;
var box = axis.box,
legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
@ -2111,6 +2108,9 @@ Licensed under the MIT license.
surface.removeText(layer);
if (!axis.show || axis.ticks.length == 0)
return;
for (var i = 0; i < axis.ticks.length; ++i) {
tick = axis.ticks[i];

Loading…
Cancel
Save