Commit eeb3432d9d72b7245784b04a5b9ae43633b9cce1
1 parent
a53fe520
Exists in
master
and in
56 other branches
La feature 'PlotFunction' est bien implementée au niveau de l'IHM
Showing
2 changed files
with
28 additions
and
14 deletions
Show diff stats
js/app/views/PlotComponents/PlotZoomPlug.js
... | ... | @@ -86,13 +86,13 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
86 | 86 | if (minValue <= max) { |
87 | 87 | this.form.getForm().findField('zoom-max-time').setValue(max); |
88 | 88 | if (this.isPlotFunction) |
89 | - this.plotFunctionParamField.setNbPoints(this.form.getForm(), minValue, max); | |
89 | + this.plotFunctionParamField.setValues(minValue, max); | |
90 | 90 | } |
91 | 91 | else { |
92 | 92 | this.form.getForm().findField('zoom-min-time').setValue(max); |
93 | 93 | this.form.getForm().findField('zoom-max-time').setValue(minValue); |
94 | 94 | if (this.isPlotFunction) |
95 | - this.plotFunctionParamField.setNbPoints(this.form.getForm(), max, minValue); | |
95 | + this.plotFunctionParamField.setValues(max, minValue); | |
96 | 96 | } |
97 | 97 | |
98 | 98 | } |
... | ... | @@ -455,14 +455,20 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
455 | 455 | return; |
456 | 456 | } |
457 | 457 | |
458 | - this.hostCmp.callInteractivePlot({ | |
459 | - 'action': 'zoom', | |
460 | - 'interactiveId': this.interactiveId, | |
461 | - 'panelId': this.panelId, | |
462 | - 'axeId': this.zoomType, | |
463 | - 'min': minZoom, | |
464 | - 'max': maxZoom | |
465 | - }); | |
458 | + if (me.isPlotFunction) { | |
459 | + console.log(me.plotFunctionType.getValues()); | |
460 | + console.log(me.plotFunctionParamField.getValues()); | |
461 | + } else { | |
462 | + this.hostCmp.callInteractivePlot({ | |
463 | + 'action': 'zoom', | |
464 | + 'interactiveId': this.interactiveId, | |
465 | + 'panelId': this.panelId, | |
466 | + 'axeId': this.zoomType, | |
467 | + 'min': minZoom, | |
468 | + 'max': maxZoom | |
469 | + }); | |
470 | + } | |
471 | + | |
466 | 472 | this.hostCmp.panelImage.resetZoom(); |
467 | 473 | } |
468 | 474 | }, |
... | ... | @@ -484,6 +490,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
484 | 490 | }); |
485 | 491 | |
486 | 492 | this.plotFunctionType.setParent(this.form.getForm()); |
493 | + this.plotFunctionParamField.setParent(this.form.getForm()); | |
487 | 494 | return this.form; |
488 | 495 | }, |
489 | 496 | |
... | ... |
js/app/views/PlotComponents/plotFunction/ParamField.js
... | ... | @@ -5,6 +5,7 @@ Ext.define('amdaPlotComp.plotFunction.ParamField', { |
5 | 5 | extend: 'Ext.form.Panel', |
6 | 6 | label_number_field: "NUMBERFIELD", |
7 | 7 | label_number_field1: "NUMBERFIELD1", |
8 | + parent: null, | |
8 | 9 | |
9 | 10 | initComponent: function () { |
10 | 11 | const items_params = []; |
... | ... | @@ -69,22 +70,28 @@ Ext.define('amdaPlotComp.plotFunction.ParamField', { |
69 | 70 | this.callParent(arguments); |
70 | 71 | }, |
71 | 72 | |
72 | - getNbPoints: function (parentForm) { | |
73 | + setParent: function (parent_) { | |
74 | + this.parent = parent_; | |
75 | + }, | |
76 | + | |
77 | + getValues: function () { | |
73 | 78 | const list = []; |
74 | 79 | for (p in this.params) { |
75 | 80 | let param = this.params[p]; |
76 | - const ui_item = parentForm.findField(this.label_number_field1 + param.id); | |
81 | + const ui_item = this.parent.findField(this.label_number_field1 + param.id); | |
77 | 82 | if (ui_item !== undefined && ui_item !== null) { |
78 | 83 | param["nb_points"] = ui_item.getValue(); |
84 | + list.push(param); | |
79 | 85 | } |
80 | 86 | } |
87 | + return { "param_nb_points": list }; | |
81 | 88 | }, |
82 | 89 | |
83 | - setNbPoints: function (parentForm, startTime, stopTime) { | |
90 | + setValues: function (startTime, stopTime) { | |
84 | 91 | for (p in this.params) { |
85 | 92 | let param = this.params[p]; |
86 | 93 | const nb_points = (stopTime - startTime) / param.MinSampling; |
87 | - const ui_item = parentForm.findField(this.label_number_field1 + param.id); | |
94 | + const ui_item = this.parent.findField(this.label_number_field1 + param.id); | |
88 | 95 | ui_item.setValue(parseInt(nb_points)); |
89 | 96 | } |
90 | 97 | } |
... | ... |