MCPcopy
hub / github.com/tensorflow/playground / playOrPause

Method playOrPause

src/playground.ts:99–110  ·  view source on GitHub ↗

Plays/pauses the player.

()

Source from the content-addressed store, hash-verified

97
98 /** Plays/pauses the player. */
99 playOrPause() {
100 if (this.isPlaying) {
101 this.isPlaying = false;
102 this.pause();
103 } else {
104 this.isPlaying = true;
105 if (iter === 0) {
106 simulationStarted();
107 }
108 this.play();
109 }
110 }
111
112 onPlayPause(callback: (isPlaying: boolean) => void) {
113 this.callback = callback;

Callers 1

makeGUIFunction · 0.80

Calls 3

pauseMethod · 0.95
playMethod · 0.95
simulationStartedFunction · 0.85

Tested by

no test coverage detected