pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/matplotlib/matplotlib/commit/725e908542a20100ef3e0a49c884bb26f304132b

ss" /> webagg: Fix another too-early use of the WebSocket. · matplotlib/matplotlib@725e908 · GitHub
Skip to content

Commit 725e908

Browse files
committed
webagg: Fix another too-early use of the WebSocket.
Because this is behind the asynchronous `ResizeObserver`, it does _not_ cause a failure to initialize the JavaScript figure, but is similar in error as the previous commit.
1 parent 30a900f commit 725e908

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lib/matplotlib/backends/web_backend/js

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ mpl.figure.prototype._init_canvas = function () {
224224
// And update the size in Python. We ignore the initial 0/0 size
225225
// that occurs as the element is placed into the DOM, which should
226226
// otherwise not happen due to the minimum size styling.
227-
if (width != 0 && height != 0) {
227+
if (fig.ws.readyState == 1 && width != 0 && height != 0) {
228228
fig.request_resize(width, height);
229229
}
230230
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy