Skip to content

Commit

Permalink
Remove charAt calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ameyms committed Oct 25, 2013
1 parent 7aeaf99 commit 5a80227
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jquery.flot.categories.js
Expand Up @@ -162,7 +162,7 @@ as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
var points = datapoints.points,
ps = datapoints.pointsize,
format = datapoints.format,
formatColumn = axis.charAt(0),
formatColumn = axis[0],
index = getNextIndex(categories);

for (var i = 0; i < points.length; i += ps) {
Expand Down
8 changes: 4 additions & 4 deletions jquery.flot.js
Expand Up @@ -2988,14 +2988,14 @@ Licensed under the MIT license.
if (m[0] == null) {
m = [m, m];
}
if (p.charAt(0) === "n") {
if (p[0] === "n") {
pos += "top:" + (m[1] + plotOffset.top) + "px;";
} else if (p.charAt(0) === "s") {
} else if (p[0] === "s") {
pos += "bottom:" + (m[1] + plotOffset.bottom) + "px;";
}
if (p.charAt(1) === "e") {
if (p[1] === "e") {
pos += "right:" + (m[0] + plotOffset.right) + "px;";
} else if (p.charAt(1) === "w") {
} else if (p[1] === "w") {
pos += "left:" + (m[0] + plotOffset.left) + "px;";
}
var legend = $("<div class='legend'>" + table.replace("style='", "style='position:absolute;" + pos +";") + "</div>").appendTo(placeholder);
Expand Down
2 changes: 1 addition & 1 deletion jquery.flot.time.js
Expand Up @@ -65,7 +65,7 @@ API.txt for details.

for (var i = 0; i < fmt.length; ++i) {

var c = fmt.charAt(i);
var c = fmt[i];

if (escape) {
switch (c) {
Expand Down

0 comments on commit 5a80227

Please sign in to comment.