AnsweredAssumed Answered

Issues with integration settings dialog window to time slider widget.

Question asked by mekk@chevron on Mar 9, 2020

Issues with integration settings dialog window to time slider widget.

 

We trying to integrate settings dialog window to time slider widget from WAB2.12. 

 

Errors: (Full logs in attachments)

1)

TypeError: Cannot read property 'interval' of undefined                           init.js:114 

 

at Object._setControls (SettingsDialog.js?wab_dv=2.8:71)
at Object._initSettingsDialog (SettingsDialog.js?wab_dv=2.8:56)
at Object.postCreate (SettingsDialog.js?wab_dv=2.8:43)
at Object.create (init.js:355)
at Object.postscript (init.js:354)
at new <anonymous> (init.js:200)
at Object.<anonymous> (Widget.js?wab_dv=2.8:911)

 

 

Below function can't get interval info from map.

==========================================================

_setControls: function (props) {
var startDate = props.startTime;
var endDate = props.endTime;
if (!(Object.prototype.toString.call(props.startTime) === '[object Date]')) {
startDate = new Date(props.startTime);
}
if (!(Object.prototype.toString.call(props.endTime) === '[object Date]'))
endDate = new Date(props.endTime);
this.tsStartDate.set({ value: startDate });
this.tsStartTime.set({ value: startDate, constraints: { timePattern: 'h:mm a' } });
this.tsEndDate.set({ value: endDate });
this.tsEndTime.set({ value: endDate, constraints: { timePattern: 'h:mm a' } });
this.tsInterval.set({ value: props.timeStopInterval.interval });
switch (props.timeStopInterval.units.toString()) {
case 'esriTimeUnitsYears':
this.tsIntervalUnit.set({ value: 'Year' });
break;
case 'esriTimeUnitsDecades':
this.tsIntervalUnit.set({ value: 'Decade' });
break;
case 'esriTimeUnitsMonths':
this.tsIntervalUnit.set({ value: 'Month' });
break;
case 'esriTimeUnitsWeeks':
this.tsIntervalUnit.set({ value: 'Week' });
break;
case 'esriTimeUnitsDays':
this.tsIntervalUnit.set({ value: 'Day' });
break;
}
if (props.thumbCount == 1) {
this.modeProgressive.check(true);
}
else {
this.modeInterval.check(true);
}
},

 

================================================================

 

 

Files:

https://js.arcgis.com/3.24/init.js 

attached widget files and logs

Outcomes