Merged
Merge Request #42
·
created by
9326 - numero de l'intervalle de la TT
From
9326
into
develop
-
Status changed to merged
29 Jul, 2022
1 commit
Showing
2 changed files
Show diff stats
js/app/views/PlotComponents/PlotContextManager.js
@@ -50,7 +50,19 @@ Ext.define('amdaPlotComp.PlotContextManager', { | @@ -50,7 +50,19 @@ Ext.define('amdaPlotComp.PlotContextManager', { | ||
50 | 50 | ||
51 | return resPanel; | 51 | return resPanel; |
52 | }, | 52 | }, |
53 | - | 53 | + |
54 | + getInterval: function (context, panel, crtTimestamp) { | ||
55 | + resInterval = null; | ||
56 | + Ext.each(panel.intervals, function (interval) { | ||
57 | + if (crtTimestamp > interval.startTime && crtTimestamp < interval.stopTime) { | ||
58 | + resInterval = interval.name + ', id : ' + interval.id; | ||
59 | + } | ||
60 | + return; | ||
61 | + }); | ||
62 | + return resInterval; | ||
63 | + }, | ||
64 | + | ||
65 | + | ||
54 | getPanelAxisById : function(panelContext, axisId) | 66 | getPanelAxisById : function(panelContext, axisId) |
55 | { | 67 | { |
56 | if (!panelContext || !panelContext.plotArea) | 68 | if (!panelContext || !panelContext.plotArea) |
js/app/views/PlotTabResultUI.js
@@ -225,6 +225,7 @@ Ext.define('amdaUI.PlotTabResultUI', { | @@ -225,6 +225,7 @@ Ext.define('amdaUI.PlotTabResultUI', { | ||
225 | var sourceXPos = me.toPixelOnSourceImage(x); | 225 | var sourceXPos = me.toPixelOnSourceImage(x); |
226 | var sourceYPos = me.toPixelOnSourceImage(y); | 226 | var sourceYPos = me.toPixelOnSourceImage(y); |
227 | var panel = amdaPlotComp.PlotContextManager.getPanel(me.crtContext, sourceXPos, sourceYPos); | 227 | var panel = amdaPlotComp.PlotContextManager.getPanel(me.crtContext, sourceXPos, sourceYPos); |
228 | + | ||
228 | var text = ''; | 229 | var text = ''; |
229 | if (me.panelImage) { | 230 | if (me.panelImage) { |
230 | if (!panel) { | 231 | if (!panel) { |
@@ -251,12 +252,18 @@ Ext.define('amdaUI.PlotTabResultUI', { | @@ -251,12 +252,18 @@ Ext.define('amdaUI.PlotTabResultUI', { | ||
251 | var xText = ''; | 252 | var xText = ''; |
252 | var yLeftText = ''; | 253 | var yLeftText = ''; |
253 | var yRightText = ''; | 254 | var yRightText = ''; |
255 | + var intervalText = ''; | ||
254 | Ext.each(panel.plotArea.axes, function (axis) { | 256 | Ext.each(panel.plotArea.axes, function (axis) { |
255 | switch (axis.id) { | 257 | switch (axis.id) { |
256 | case 'timeAxis': | 258 | case 'timeAxis': |
257 | var crtTimestamp = amdaPlotComp.PlotContextManager.toAxisValue(axis, panel.plotArea.x, panel.plotArea.x + panel.plotArea.width, sourceXPos); | 259 | var crtTimestamp = amdaPlotComp.PlotContextManager.toAxisValue(axis, panel.plotArea.x, panel.plotArea.x + panel.plotArea.width, sourceXPos); |
258 | var crtTime = new Date(crtTimestamp * 1000); | 260 | var crtTime = new Date(crtTimestamp * 1000); |
261 | + var interval = amdaPlotComp.PlotContextManager.getInterval(me.crtContext, panel, crtTimestamp); | ||
259 | xText = crtTime.toJSON(); | 262 | xText = crtTime.toJSON(); |
263 | + | ||
264 | + if (interval != null) { | ||
265 | + intervalText = interval; | ||
266 | + } | ||
260 | break; | 267 | break; |
261 | case 'y-left': | 268 | case 'y-left': |
262 | yLeftText = me.getAxisValue(axis, panel.plotArea.y + panel.plotArea.height, panel.plotArea.y, sourceYPos); | 269 | yLeftText = me.getAxisValue(axis, panel.plotArea.y + panel.plotArea.height, panel.plotArea.y, sourceYPos); |
@@ -280,6 +287,8 @@ Ext.define('amdaUI.PlotTabResultUI', { | @@ -280,6 +287,8 @@ Ext.define('amdaUI.PlotTabResultUI', { | ||
280 | text += (', Y Left : ' + yLeftText); | 287 | text += (', Y Left : ' + yLeftText); |
281 | if (yRightText != '') | 288 | if (yRightText != '') |
282 | text += (', Y Right : ' + yRightText); | 289 | text += (', Y Right : ' + yRightText); |
290 | + if (intervalText != '') | ||
291 | + text += (', TT : ' + intervalText); | ||
283 | } | 292 | } |
284 | else | 293 | else |
285 | me.panelImage.resetCursor(); | 294 | me.panelImage.resetCursor(); |