8000 Merge pull request #14387 from timhoffm/fix-matplotlib-notebook-zoom · matplotlib/matplotlib@285c119 · GitHub
[go: up one dir, main page]

Skip to content

Commit 285c119

Browse files
authored
Merge pull request #14387 from timhoffm/fix-matplotlib-notebook-zoom
Fix clearing rubberband on nbagg
2 parents e74800a + 6da1328 commit 285c119

File tree

1 file changed

+1
-1
lines changed
  • lib/matplotlib/backends/web_backend/js

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/web_backend/js/mpl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ mpl.figure.prototype.handle_rubberband = function(fig, msg) {
346346
var height = Math.abs(y1 - y0);
347347

348348
fig.rubberband_context.clearRect(
349-
0, 0, fig.canvas.width, fig.canvas.height);
349+
0, 0, fig.canvas.width / mpl.ratio, fig.canvas.height / mpl.ratio);
350350

351351
fig.rubberband_context.strokeRect(min_x, min_y, width, height);
352352
}

0 commit comments

Comments
 (0)
0