Javascript setTimeout function

前端 未结 6 1233
长发绾君心
长发绾君心 2021-01-14 11:56

I am calling this function

function drawLayers() {

    //setTimeout(drawBlueSky,500);
    //setTimeout(drawCircle1,1250);
    setTimeout(drawMoon,800);
             


        
6条回答
  •  心在旅途
    2021-01-14 12:33

    You could make a central var isStopped = false; variable which you set to true when stopping. Then make every function check for the variable before executing.

提交回复
热议问题