Commit 535d7638ad678d67b7ec50f9b5935b2b97046e5d

Authored by Menouar AZIB
1 parent 85721867

I have added a context menu to display 'plotFunction, Appliquer une transformation' from right click

Showing 1 changed file with 22 additions and 12 deletions   Show diff stats
js/app/views/PlotTabResultUI.js
@@ -153,6 +153,16 @@ Ext.define('amdaUI.PlotTabResultUI', { @@ -153,6 +153,16 @@ Ext.define('amdaUI.PlotTabResultUI', {
153 }, 153 },
154 scope: this 154 scope: this
155 }); 155 });
  156 + //plotFunction Menu
  157 + me.contextualMenu.add({
  158 + text: 'Appliquer une Transformation',
  159 + handler: function (item, e) {
  160 + zoomPlugin.show(me.interactiveId, axis.id, panelContext.id, true);
  161 + zoomPlugin.resetMinMaxValue();
  162 + me.panelImage.startZoom(true, 0, size.height, onMinTimeSelection, onMaxTimeSelection);
  163 + },
  164 + scope: this
  165 + });
156 insertIntervalItem = { 166 insertIntervalItem = {
157 text: 'Insert Interval in TimeTable or Catalog', 167 text: 'Insert Interval in TimeTable or Catalog',
158 handler: function (item, e) { 168 handler: function (item, e) {
@@ -529,25 +539,25 @@ Ext.define('amdaUI.PlotTabResultUI', { @@ -529,25 +539,25 @@ Ext.define('amdaUI.PlotTabResultUI', {
529 this.callInteractivePlot({ 'action': 'goto', 'interactiveId': this.interactiveId, 'ttFileIndex': ttFileIndex, 'intIndex': ttintervalIndex }); 539 this.callInteractivePlot({ 'action': 'goto', 'interactiveId': this.interactiveId, 'ttFileIndex': ttFileIndex, 'intIndex': ttintervalIndex });
530 } 540 }
531 }, 541 },
532 - '-', 542 + '-',
533 { 543 {
534 text: 'Use This Time Inteval', 544 text: 'Use This Time Inteval',
535 scope: this, 545 scope: this,
536 - handler: function(){  
537 - var timeObj = new Object();  
538 - var startTime = new Date(this.crtContext.page.startTime*1000);  
539 - timeObj.start = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset());  
540 -  
541 - var stopTime = new Date(this.crtContext.page.stopTime*1000);  
542 - timeObj.stop = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset()); 546 + handler: function () {
  547 + var timeObj = new Object();
  548 + var startTime = new Date(this.crtContext.page.startTime * 1000);
  549 + timeObj.start = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset());
  550 +
  551 + var stopTime = new Date(this.crtContext.page.stopTime * 1000);
  552 + timeObj.stop = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset());
543 553
544 var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); 554 var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
545 - plotModule.setTimeInterval(timeObj); 555 + plotModule.setTimeInterval(timeObj);
546 } 556 }
547 }, 557 },
548 - '-',  
549 - {  
550 - text: 'Go to Interval #', 558 + '-',
  559 + {
  560 + text: 'Go to Interval #',
551 scope: this, 561 scope: this,
552 handler: function (bt) { 562 handler: function (bt) {
553 var ttGotoNumberField = this.navToolBar.items.get('tt-goto-number-' + this.interactiveId); 563 var ttGotoNumberField = this.navToolBar.items.get('tt-goto-number-' + this.interactiveId);