Browse Source

Undid last commit in a very roundabout way.

codeClimate
Wim Rijnders 8 years ago
parent
commit
124b70ffeb
1 changed files with 25 additions and 16 deletions
  1. +25
    -16
      lib/graph3d/Graph3d.js

+ 25
- 16
lib/graph3d/Graph3d.js View File

@ -831,25 +831,34 @@ Graph3d.prototype.redraw = function() {
this._redrawClear();
this._redrawAxis();
if (this.style === Graph3d.STYLE.GRID ||
this.style === Graph3d.STYLE.SURFACE) {
this._redrawDataGrid();
}
else if (this.style === Graph3d.STYLE.LINE) {
this._redrawDataLine();
var pointDrawingMethod = undefined;
switch (this.style) {
case Graph3d.STYLE.BAR:
pointDrawingMethod = Graph3d.prototype._redrawBarGraphPoint;
break;
}
else if (this.style === Graph3d.STYLE.BAR) {
// Pass a method reference here
this._redrawDataGraph(Graph3d.prototype._redrawBarGraphPoint);
if (pointDrawingMethod !== undefined) {
// Use generic drawing loop
// Pass the method reference here
this._redrawDataGraph(pointDrawingMethod);
} else {
// Use the old style drawing methods
} else if (this.style === Graph3d.STYLE.BARCOLOR ||
this.style === Graph3d.STYLE.BARSIZE) {
this._redrawDataBar();
}
else {
// style is DOT, DOTLINE, DOTCOLOR, DOTSIZE
this._redrawDataDot();
if (this.style === Graph3d.STYLE.GRID ||
this.style === Graph3d.STYLE.SURFACE) {
this._redrawDataGrid();
}
else if (this.style === Graph3d.STYLE.LINE) {
this._redrawDataLine();
} else if (this.style === Graph3d.STYLE.BARCOLOR ||
this.style === Graph3d.STYLE.BARSIZE) {
this._redrawDataBar();
}
else {
// style is DOT, DOTLINE, DOTCOLOR, DOTSIZE
this._redrawDataDot();
}
}
this._redrawInfo();

Loading…
Cancel
Save