Skip to content

Commit

Permalink
#544 Fix setTime currentTime timezone, default layer time objects (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed May 31, 2024
1 parent 844954d commit e4eda47
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/essence/Ancillary/TimeUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,9 +1067,12 @@ const TimeUI = {
dontRemoveOffset,
ignoreDontChange
) {
const timestamp =
typeof ISOString === 'string' ? Date.parse(ISOString) : ISOString
TimeUI._timeSliderTimestamp = timestamp
if (typeof ISOString === 'string') {
TimeUI._timeSliderTimestamp = TimeUI.addOffset(ISOString)
} else {
TimeUI._timeSliderTimestamp = ISOString
}

if (TimeUI.play) {
const date = new Date(TimeUI._timeSliderTimestamp)
const offsetNowDate = new Date(
Expand Down
5 changes: 5 additions & 0 deletions src/essence/Basics/Layers_/Layers_.js
Original file line number Diff line number Diff line change
Expand Up @@ -3379,6 +3379,11 @@ function parseConfig(configData, urlOnLayers) {
})(d[i].name)
)
}

// Set disabled time object if missing
if (d[i].time == null) {
d[i].time = { enabled: false }
}
}

//Create parsed layers data
Expand Down

0 comments on commit e4eda47

Please sign in to comment.