File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed
lib/matplotlib/backends/web_static Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 7
7
onkeydown ="key_event(event, 'key_press') "
8
8
onkeyup ="key_event(event, 'key_release') ">
9
9
< div id ="mpl-div ">
10
+ < div id ="mpl-warnings " class ="mpl-warnings "> </ div >
11
+
10
12
< canvas id ="mpl-canvas "
11
13
class ="mpl-canvas "
12
14
width ="800 " height ="600 "
Original file line number Diff line number Diff line change
1
+ body {
2
+ font-family : sans;
3
+ }
4
+
5
+ .mpl-warnings {
6
+ display : none;
7
+ background : # ffdddd ;
8
+ color : # 880000 ;
9
+ border : 1 # 880000 ;
10
+ }
11
+
1
12
.mpl-message {
2
13
float : right;
3
14
vertical-align : middle;
Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ window.onload = function() {
30
30
31
31
var supports_binary = ( ws . binaryType != undefined ) ;
32
32
33
+ if ( ! supports_binary ) {
34
+ var warnings = document . getElementById ( "mpl-warnings" ) ;
35
+ warnings . style . display = 'block' ;
36
+ warnings . textContent = (
37
+ "This browser does not support binary websocket messages. " +
38
+ "Performance may be slow." ) ;
39
+ }
40
+
33
41
ws . onopen = function ( ) {
34
42
ws . send ( JSON . stringify (
35
43
{ type : 'supports_binary' ,
You can’t perform that action at this time.
0 commit comments