File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ def _wait(cvs): # wait for an event
392
392
cvs ._waitfor = None
393
393
if _isnotebook : baseObj .trigger () # in notebook environment must send methods immediately
394
394
while cvs ._waitfor is None :
395
- rate (30 )
395
+ rate (100 )
396
396
return cvs ._waitfor
397
397
398
398
class color (object ):
Original file line number Diff line number Diff line change @@ -118,16 +118,18 @@ function checkloading() {
118
118
function domessage ( msg ) {
119
119
"use strict" ;
120
120
if ( timer !== null ) clearTimeout ( timer )
121
- var t1 = msclock ( )
121
+ var t1 = msclock ( )
122
122
var data = msg . content . data
123
123
if ( data != 'trigger' ) {
124
124
var msg = decode ( data )
125
125
handler ( msg )
126
- }
127
- var t2 = msclock ( )
128
- var dt = Math . floor ( t1 + interval - t2 ) // attempt to keep the time between renders constant
129
- if ( dt < 15 ) dt = 0 // becaause setTimeout is inaccurate for small dt's
130
- timer = setTimeout ( send , dt )
126
+ }
127
+ if ( timer !== null ) { // if not a wait situation as with compound/extrusion/text
128
+ var t2 = msclock ( )
129
+ var dt = Math . floor ( t1 + interval - t2 ) // attempt to keep the time between renders constant
130
+ if ( dt < 15 ) dt = 0 // becaause setTimeout is inaccurate for small dt's
131
+ timer = setTimeout ( send , dt )
132
+ }
131
133
}
132
134
133
135
// vpython.py calls onmessage, which responds through domessage, using send
@@ -148,7 +150,7 @@ function onmessage(msg) {
148
150
if ( timer !== undefined && timer !== null ) clearTimeout ( timer )
149
151
150
152
function send ( ) { // periodically send events and update_canvas and request object update
151
- "use strict" ;
153
+ "use strict" ;
152
154
var update = update_canvas ( )
153
155
if ( update !== null ) events = events . concat ( update )
154
156
if ( events . length === 0 ) events = [ { event :'update_canvas' , 'trigger' :1 } ]
You can’t perform that action at this time.
0 commit comments