bruce-cesium 3.6.1 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15295,7 +15295,7 @@
15295
15295
  Manager.prototype.renderMovingItem = function () {
15296
15296
  var _a;
15297
15297
  return __awaiter(this, void 0, void 0, function () {
15298
- var api, vehicleFileUrl, lineColor, fileStrings, files, i, file, fileId, externalURL, fileUrl, fileStr, csvData, i, delimiter, fileStr, headers, rows, rowsArr, j, row, rowArr, primary, pHeaders, pLatIndex, pLonIndex, pDateTimeIndex, i, row, lat, lon, dateTime, vehicleId, czml, source, errorsInARow_1, removal_1;
15298
+ var api, vehicleFileUrl, lineColor, fileStrings, files, i, file, fileId, externalURL, fileUrl, fileStr, csvData, i, delimiter, fileStr, headers, rows, rowsArr, j, row, rowArr, primary, pHeaders, pLatIndex, pLonIndex, pDateTimeIndex, i, row, lat, lon, dateTime, vehicleId, czml, czmlAdjusted, curDateTime, source, errorsInARow_1, removal_1;
15299
15299
  var _this = this;
15300
15300
  return __generator(this, function (_b) {
15301
15301
  switch (_b.label) {
@@ -15398,10 +15398,18 @@
15398
15398
  vehicleId = bruceModels.ObjectUtils.UId();
15399
15399
  czml = createJourneyCzml(vehicleId, vehicleFileUrl, lineColor, primary);
15400
15400
  this.czmlDataInputs.push(czml);
15401
- return [4 /*yield*/, this.viewer.dataSources.add(Cesium.CzmlDataSource.load(czml))];
15401
+ czmlAdjusted = JSON.parse(JSON.stringify(czml));
15402
+ czmlAdjusted.forEach(function (item) {
15403
+ delete item.clock;
15404
+ });
15405
+ curDateTime = this.viewer.clock.currentTime;
15406
+ return [4 /*yield*/, this.viewer.dataSources.add(Cesium.CzmlDataSource.load(czmlAdjusted))];
15402
15407
  case 7:
15403
15408
  source = _b.sent();
15404
15409
  this.dataSource = source;
15410
+ // Reset back to the previous dateTime.
15411
+ // Adding the czml data source will have changed the clock.
15412
+ this.viewer.clock.currentTime = curDateTime;
15405
15413
  // Listen to update ticks and ensure orientation of moving item is correct.
15406
15414
  if (this.viewer.clock) {
15407
15415
  errorsInARow_1 = 0;
@@ -22040,7 +22048,7 @@
22040
22048
  ViewRenderEngine.Render = Render;
22041
22049
  })(exports.ViewRenderEngine || (exports.ViewRenderEngine = {}));
22042
22050
 
22043
- var VERSION = "3.6.1";
22051
+ var VERSION = "3.6.2";
22044
22052
 
22045
22053
  exports.VERSION = VERSION;
22046
22054
  exports.CesiumParabola = CesiumParabola;