Skip to content

Commit 123fbb1

Browse files
ianthomas23meeseeksmachine
authored andcommitted
Backport PR matplotlib#32149: Always set device pixel ratio on WebSocket open in WebAgg
1 parent a2fcca5 commit 123fbb1

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

  • lib/matplotlib/backends/web_backend/js

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,9 @@ mpl.figure = function (figure_id, websocket, ondownload, parent_element) {
6464
this.ws.onopen = function () {
6565
fig.send_message('supports_binary', { value: fig.supports_binary });
6666
fig.send_message('send_image_mode', {});
67-
if (fig.ratio !== 1) {
68-
fig.send_message('set_device_pixel_ratio', {
69-
device_pixel_ratio: fig.ratio,
70-
});
71-
}
67+
fig.send_message('set_device_pixel_ratio', {
68+
device_pixel_ratio: fig.ratio,
69+
});
7270
fig.send_message('refresh', {});
7371
};
7472

0 commit comments

Comments
 (0)