Skip to content

Commit

Permalink
add doc & rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurmarakana89 committed Feb 22, 2024
1 parent 9f727a4 commit fdd8401
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1504,10 +1504,11 @@ export abstract class AbstractGeoViewLayer {
*
* @param {string} layerPath The layer path to the layer's configuration affected by the change.
* @param {TimeDimension} temporalDimension The value to assign to the layer temporal dimension property.
* @param {boolean} custom Flag allow's to customize the layer's temporal dimension property.
*/
setTemporalDimension(layerPath: string, temporalDimension: TimeDimension, override: boolean): void {
setTemporalDimension(layerPath: string, temporalDimension: TimeDimension, custom: boolean): void {
layerPath = layerPath || this.layerPathAssociatedToTheGeoviewLayer;
if (override) {
if (custom) {
const timeDimension: TimeDimension = {
field: temporalDimension.field,
default: temporalDimension.default,
Expand Down
4 changes: 3 additions & 1 deletion packages/geoview-time-slider/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ class TimeSliderPlugin extends FooterPlugin {
// Set custom time dimension if applicable
this.configObj.sliders.forEach((obj: SliderProps) => {
if (obj.temporalDimension) {
api.maps[this.pluginProps.mapId].layer.geoviewLayer(obj.layerPaths[0]).setTemporalDimension(obj.layerPaths[0], {
api.maps[this.pluginProps.mapId].layer.geoviewLayer(obj.layerPaths[0]).setTemporalDimension(
obj.layerPaths[0],
{
...obj.temporalDimension,
},
true
Expand Down

0 comments on commit fdd8401

Please sign in to comment.