diff --git a/html/planeObject.js b/html/planeObject.js index 90e4741..1f4f4d6 100644 --- a/html/planeObject.js +++ b/html/planeObject.js @@ -1142,7 +1142,6 @@ PlaneObject.prototype.processTrace = function() { _now = timestamp; if (traceOpts.showTime && timestamp > traceOpts.showTime) { - traceOpts.showTimeEnd = timestamp; if (traceOpts.replaySpeed > 0) { clearTimeout(traceOpts.showTimeout); traceOpts.animateRealtime = (timestamp - traceOpts.showTime) * 1000; @@ -1154,9 +1153,12 @@ PlaneObject.prototype.processTrace = function() { traceOpts.animateStepTime = traceOpts.animateRealtime / traceOpts.replaySpeed / traceOpts.animateSteps; if (traceOpts.animateSteps < 2) { - traceOpts.showTimeout = setTimeout(gotoTime, traceOpts.animateTime); traceOpts.animate = false; + //console.log(`animateTime: ${traceOpts.animateTime}`); + traceOpts.showTime = timestamp; + traceOpts.showTimeout = setTimeout(gotoTime, traceOpts.animateTime); } else { + traceOpts.showTimeEnd = timestamp; //console.timeEnd('step'); //console.time('step'); //console.log(traceOpts.animateTime); diff --git a/html/script.js b/html/script.js index 62a8a90..8c8beba 100644 --- a/html/script.js +++ b/html/script.js @@ -7117,6 +7117,7 @@ function drawOutlineJson() { } function gotoTime(timestamp) { + //console.log(`gotoTime(${timestamp}) animate: {${traceOpts.animate}}`); clearTimeout(traceOpts.showTimeout); if (timestamp) { traceOpts.showTime = timestamp; @@ -7136,10 +7137,11 @@ function gotoTime(timestamp) { if (--traceOpts.animateCounter == 1) { traceOpts.animate = false; traceOpts.showTime = traceOpts.showTimeEnd; - console.log(traceOpts.showTime); } traceOpts.animateStepTime = traceOpts.animateRealtime / traceOpts.replaySpeed / traceOpts.animateSteps; + clearTimeout(traceOpts.showTimeout); + //console.log(`setTimeout(gotoTime, (${traceOpts.animateStepTime}))`); traceOpts.showTimeout = setTimeout(gotoTime, traceOpts.animateStepTime); } }