File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1553,9 +1553,17 @@ class Activity {
15531553 // Queue and take first step.
15541554 if ( ! this . turtles . running ( ) ) {
15551555 this . logo . runLogoCommands ( ) ;
1556+ docById ( "stop" ) . style . color = this . toolbar . stopIconColorWhenPlaying ;
15561557 }
15571558 this . logo . step ( ) ;
15581559 } else {
1560+
1561+ const noBlocks = Object . keys ( this . logo . stepQueue ) . every ( key => this . logo . stepQueue [ key ] . length === 0 ) ;
1562+ if ( noBlocks ) {
1563+ this . logo . doStopTurtles ( ) ;
1564+ docById ( "stop" ) . style . color = "white" ;
1565+ return ;
1566+ }
15591567 this . logo . turtleDelay = this . TURTLESTEP ;
15601568 this . logo . step ( ) ;
15611569 }
Original file line number Diff line number Diff line change @@ -991,7 +991,6 @@ class Toolbar {
991991
992992 runStepByStepIcon . onclick = ( ) => {
993993 onclick ( this . activity ) ;
994- docById ( "stop" ) . style . color = this . stopIconColorWhenPlaying ;
995994 } ;
996995 }
997996
You can’t perform that action at this time.
0 commit comments