Commits

srichter committed 8abcc80

Fix the case where length is 0.

Comments (0)

Files changed (1)

src/jqplot.shapeRenderer.js

         var dX = x1 - x0;
         var dY = y1 - y0;
         var len = Math.sqrt(dX*dX + dY*dY);
-        dX /= len;
-        dY /= len;
+        if (len != 0) {
+          dX /= len;
+          dY /= len;
+        }
         var tMax = len;
 
         var t = -dashState.offset;