projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
537fe03
)
clean up
author
Dan Vanderkam
<dan@dygraphs.com>
Wed, 18 Jul 2012 15:20:18 +0000
(10:20 -0500)
committer
Dan Vanderkam
<dan@dygraphs.com>
Wed, 18 Jul 2012 15:20:18 +0000
(10:20 -0500)
dygraph-canvas.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
f8167a7
..
720ab80
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-307,7
+307,6
@@
DygraphCanvasRenderer.prototype._drawSeries = function(
ctx.lineWidth = strokeWidth;
for (var i = iter.start_; i < iter.end_; i++) {
ctx.lineWidth = strokeWidth;
for (var i = iter.start_; i < iter.end_; i++) {
- // while (iter.hasNext) {
point = iter.array_[i];
if (iter.predicate_) {
while (i < iter.end_ && !iter.predicate_(iter.array_, i)) {
point = iter.array_[i];
if (iter.predicate_) {
while (i < iter.end_ && !iter.predicate_(iter.array_, i)) {
@@
-327,18
+326,10
@@
DygraphCanvasRenderer.prototype._drawSeries = function(
} else {
isIsolated = false;
if (drawGapPoints || !prevCanvasX) {
} else {
isIsolated = false;
if (drawGapPoints || !prevCanvasX) {
- // nextCanvasY = iter.hasNext ? iter.peek.canvasy : null;
- // var next_i = i + 1;
- // while (next_i < iter.end_ && (!iter.predicate_ || !iter.predicate_(iter.array_, next_i))) {
- // next_i++;
- // }
iter.nextIdx_ = i;
var peek = iter.next();
nextCanvasY = iter.hasNext ? iter.peek.canvasy : null;
iter.nextIdx_ = i;
var peek = iter.next();
nextCanvasY = iter.hasNext ? iter.peek.canvasy : null;
- // nextCanvasY = next_i < iter.end_ ? iter.array_[next_i].canvasy : null;
- // TODO: we calculate isNullOrNaN for this point, and the next, and then,
- // when we iterate, test for isNullOrNaN again. Why bother?
var isNextCanvasYNullOrNaN = nextCanvasY === null ||
nextCanvasY != nextCanvasY;
isIsolated = (!prevCanvasX && isNextCanvasYNullOrNaN);
var isNextCanvasYNullOrNaN = nextCanvasY === null ||
nextCanvasY != nextCanvasY;
isIsolated = (!prevCanvasX && isNextCanvasYNullOrNaN);