()
| 478 | ); |
| 479 | |
| 480 | var drawRubberband = function () { |
| 481 | // Draw the lines from x0, y0 towards x1, y1 so that the |
| 482 | // dashes don't "jump" when moving the zoom box. |
| 483 | ctx.beginPath(); |
| 484 | ctx.moveTo(x0, y0); |
| 485 | ctx.lineTo(x0, y1); |
| 486 | ctx.moveTo(x0, y0); |
| 487 | ctx.lineTo(x1, y0); |
| 488 | ctx.moveTo(x0, y1); |
| 489 | ctx.lineTo(x1, y1); |
| 490 | ctx.moveTo(x1, y0); |
| 491 | ctx.lineTo(x1, y1); |
| 492 | ctx.stroke(); |
| 493 | }; |
| 494 | |
| 495 | fig.rubberband_context.lineWidth = 1; |
| 496 | fig.rubberband_context.setLineDash([3]); |