From 535d7638ad678d67b7ec50f9b5935b2b97046e5d Mon Sep 17 00:00:00 2001
From: Menouar AZIB <menouar.azib@akka.eu>
Date: Mon, 29 Aug 2022 15:28:36 +0200
Subject: [PATCH] I have added a context menu to display 'plotFunction, Appliquer une transformation' from right click

---
 js/app/views/PlotTabResultUI.js | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/js/app/views/PlotTabResultUI.js b/js/app/views/PlotTabResultUI.js
index 5cd3af2..81ea990 100644
--- a/js/app/views/PlotTabResultUI.js
+++ b/js/app/views/PlotTabResultUI.js
@@ -153,6 +153,16 @@ Ext.define('amdaUI.PlotTabResultUI', {
 						},
 						scope: this
 					});
+					//plotFunction Menu
+					me.contextualMenu.add({
+						text: 'Appliquer une Transformation',
+						handler: function (item, e) {
+							zoomPlugin.show(me.interactiveId, axis.id, panelContext.id, true);
+							zoomPlugin.resetMinMaxValue();
+							me.panelImage.startZoom(true, 0, size.height, onMinTimeSelection, onMaxTimeSelection);
+						},
+						scope: this
+					});
 					insertIntervalItem = {
 						text: 'Insert Interval in TimeTable or Catalog',
 						handler: function (item, e) {
@@ -529,25 +539,25 @@ Ext.define('amdaUI.PlotTabResultUI', {
 					this.callInteractivePlot({ 'action': 'goto', 'interactiveId': this.interactiveId, 'ttFileIndex': ttFileIndex, 'intIndex': ttintervalIndex });
 				}
 			},
-            '-',
+				'-',
 			{
 				text: 'Use This Time Inteval',
 				scope: this,
-				handler: function(){
-                                                                                                    var timeObj = new Object();
-                                                                                                    var startTime = new Date(this.crtContext.page.startTime*1000);
-                                                                                                    timeObj.start  = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset());
-                                                                                                    
-                                                                                                    var stopTime = new Date(this.crtContext.page.stopTime*1000);
-					timeObj.stop  = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset());
+				handler: function () {
+					var timeObj = new Object();
+					var startTime = new Date(this.crtContext.page.startTime * 1000);
+					timeObj.start = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset());
+
+					var stopTime = new Date(this.crtContext.page.stopTime * 1000);
+					timeObj.stop = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset());
 
 					var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
-                                                                                                    plotModule.setTimeInterval(timeObj);
+					plotModule.setTimeInterval(timeObj);
 				}
 			},
-			'-',
-			{		 
-				text: 'Go to Interval #',  
+				'-',
+			{
+				text: 'Go to Interval #',
 				scope: this,
 				handler: function (bt) {
 					var ttGotoNumberField = this.navToolBar.items.get('tt-goto-number-' + this.interactiveId);
--
libgit2 0.21.2