PlotFunctionIntervalSelection.js
1.21 KB
Ext.define('amdaPlotComp.intervalSelection.PlotFunctionIntervalSelection', {
extend: 'amdaPlotComp.intervalSelection.IntervalSelection',
requires: ['amdaPlotComp.plotFunction.FunctionType'],
title: "Plot Function",
plotFunctionType: null,
initComponent: function () {
this.callParent(arguments);
this.plotFunctionType = new amdaPlotComp.plotFunction.FunctionType();
this.parent.add(this.plotFunctionType);
},
_apply: function () {
if (this._notValidValues()) {
myDesktopApp.warningMsg('Please note that either the Start Time or the Stop Time has not been defined. To proceed, ensure both times are properly set.');
} else {
let request_to_send = {};
request_to_send = Object.assign({}, this.plotFunctionType.getValues());
request_to_send = Object.assign({}, request_to_send, {
'action': 'plotFunction',
'interactiveId': this.interactiveId,
'panelId': this.panelId,
'starttime': this.getField1Value(),
'stoptime': this.getField2Value(),
});
this.hostCmp.callInteractivePlot(request_to_send);
}
},
});