+ // if there are large gaps on the x-axis, it's essential to keep the
+ // first and last point as well.
+ var hasGapOnLeft = (lastRoundedX - lastFlushedX > 1),
+ hasGapOnRight = (rx - lastRoundedX > 1),
+ hasGap = hasGapOnLeft || hasGapOnRight;
+ flushActions(hasGap);