File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
src/modules/history-track Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -325,17 +325,15 @@ class Track {
325325 this . _positionIndex = 0
326326 } else if ( params ?. stopTime && params ?. duration ) {
327327 this . _duration += params . duration
328- this . _timeLine = this . _timeLine . map ( ( item ) => {
329- if ( Cesium . JulianDate . greaterThan ( item , params . stopTime ) ) {
330- item = Cesium . JulianDate . addSeconds (
331- item ,
332- params . duration ,
333- new Cesium . JulianDate ( )
334- )
335- }
336- return item
337- } )
328+ this . _timeLine = this . _timeLine . map ( ( item ) =>
329+ Cesium . JulianDate . addSeconds (
330+ item ,
331+ params . duration ,
332+ new Cesium . JulianDate ( )
333+ )
334+ )
338335 }
336+
339337 this . _sampledPosition = new Cesium . SampledPositionProperty ( )
340338 this . _sampledPosition . addSamples (
341339 this . _timeLine ,
@@ -360,9 +358,11 @@ class Track {
360358 interpolationAlgorithm : Cesium . LagrangePolynomialApproximation ,
361359 } )
362360 }
361+
363362 this . _velocityOrientation = new Cesium . VelocityOrientationProperty (
364363 this . _sampledPosition
365364 )
365+
366366 this . _endTime = Cesium . JulianDate . addSeconds (
367367 this . _timeLine [ this . _timeLine . length - 1 ] ,
368368 this . _options . endDelayTime ,
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ class TrackController {
147147
148148 /**
149149 *
150+ * @returns {TrackController }
150151 */
151152 restore ( ) {
152153 if ( this . _state !== State . PAUSE ) {
You can’t perform that action at this time.
0 commit comments