Skip to content

Commit

Permalink
Merge pull request #4 from xmalinov/master
Browse files Browse the repository at this point in the history
Fix critical syntax errors and typos
  • Loading branch information
jagracar authored Jan 27, 2018
2 parents 1b7c1c5 + 1310f72 commit 4cb5e61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/GHistogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ GHistogram.prototype.setPlotPoints = function(plotPoints) {
this.plotPoints[i].set(plotPoints[i]);
}

for ( i = this.plotPoints.lengh; i < nPoints; i++) {
for ( i = this.plotPoints.length; i < nPoints; i++) {
this.plotPoints[i] = new GPoint(plotPoints[i]);
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/GLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ GLayer.prototype.drawLines = function() {
};

GLayer.prototype.drawLine = function() {
var point1, point2, lc, lw, slope, ycut;
var point1, point2, lc, lw, slope, yCut;

if (arguments.length === 4 && arguments[0] instanceof GPoint) {
point1 = arguments[0];
Expand All @@ -617,7 +617,7 @@ GLayer.prototype.drawLine = function() {
lw = arguments[3];
} else if (arguments.length === 4) {
slope = arguments[0];
ycut = arguments[1];
yCut = arguments[1];
lc = arguments[2];
lw = arguments[3];
} else if (arguments.length === 2 && arguments[0] instanceof GPoint) {
Expand All @@ -627,7 +627,7 @@ GLayer.prototype.drawLine = function() {
lw = this.lineWidth;
} else if (arguments.length === 2) {
slope = arguments[0];
ycut = arguments[1];
yCut = arguments[1];
lc = this.lineColor;
lw = this.lineWidth;
} else {
Expand Down Expand Up @@ -1465,7 +1465,7 @@ GLayer.prototype.setPoint = function() {
index = arguments[0];
x = arguments[1];
y = arguments[2];
label = (index < nPoins) ? this.points[index].getLabel() : "";
label = (index < nPoints) ? this.points[index].getLabel() : "";
} else if (arguments.length === 2) {
index = arguments[0];
x = arguments[1].getX();
Expand Down
15 changes: 7 additions & 8 deletions src/GPlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ GPlot.prototype.centerAndZoom = function(factor, xValue, yValue) {
this.xAxis.setLim(this.xLim);
this.topAxis.setLim(this.xLim);
this.yAxis.setLim(this.yLim);
this.rightAxis.setLim(yLim);
this.rightAxis.setLim(this.yLim);

// Update the plot limits (the layers, because the limits are fixed)
this.updateLimits();
Expand Down Expand Up @@ -925,8 +925,7 @@ GPlot.prototype.drawLegend = function(text, xRelativePos, yRelativePos) {
} else {
this.parent.fill(this.layerList[i - 1].getLineColor());
this.parent.rect(plotPosition[0], plotPosition[1], rectSize, rectSize);
this.layerList[i - i].drawAnnotation(text[i], position[0], position[1], this.parent.LEFT,
this.parent.CENTER);
this.layerList[i - i].drawAnnotation(text[i], position[0], position[1], this.parent.LEFT, this.parent.CENTER);
}
}

Expand Down Expand Up @@ -1475,19 +1474,19 @@ GPlot.prototype.setVerticalAxesTicks = function(ticks) {
};

GPlot.prototype.setFontName = function(fontName) {
this.maniLayer.setFontName(fontName);
this.mainLayer.setFontName(fontName);
};

GPlot.prototype.setFontColor = function(fontColor) {
this.maniLayer.setFontColor(fontColor);
this.mainLayer.setFontColor(fontColor);
};

GPlot.prototype.setFontSize = function(fontSize) {
this.maniLayer.setFontSize(fontSize);
this.mainLayer.setFontSize(fontSize);
};

GPlot.prototype.setFontProperties = function(fontName, fontColor, fontSize) {
this.maniLayer.setFontProperties(fontName, fontColor, fontSize);
this.mainLayer.setFontProperties(fontName, fontColor, fontSize);
};

GPlot.prototype.setAllFontProperties = function(fontName, fontColor, fontSize) {
Expand All @@ -1499,7 +1498,7 @@ GPlot.prototype.setAllFontProperties = function(fontName, fontColor, fontSize) {

this.mainLayer.setAllFontProperties(fontName, fontColor, fontSize);

for (var i = 0; i < layerList.length; i++) {
for (var i = 0; i < this.layerList.length; i++) {
this.layerList[i].setAllFontProperties(fontName, fontColor, fontSize);
}
};
Expand Down

0 comments on commit 4cb5e61

Please sign in to comment.