Commit 6c15409184255b6898ac1f15a5b8a3409581c8da
1 parent
a73f0195
Exists in
master
and in
111 other branches
Disabled nav bar if superpose mode
Showing
2 changed files
with
25 additions
and
15 deletions
Show diff stats
js/app/controllers/PlotModule.js
... | ... | @@ -79,13 +79,13 @@ Ext.define('amdaDesktop.PlotModule', { |
79 | 79 | |
80 | 80 | var winResult = me.getWindowResult(winResultId); |
81 | 81 | |
82 | + console.log(tabResult); | |
82 | 83 | var plotTabConfig = { |
83 | 84 | folder : session.folder, |
84 | 85 | plotFile : tabResult.plot, |
85 | 86 | context : tabResult.context, |
86 | 87 | tabId : tabResult.id, |
87 | 88 | multiplot : tabResult.multiplot, |
88 | - superposeMode : tabResult.superposeMode, | |
89 | 89 | isInterval: tabResult.isInterval, |
90 | 90 | ttName : tabResult.ttName, |
91 | 91 | ttIndex : tabResult.ttIndex, |
... | ... |
js/app/views/PlotTabResultUI.js
... | ... | @@ -59,6 +59,8 @@ Ext.define('amdaUI.PlotTabResultUI', { |
59 | 59 | }, |
60 | 60 | |
61 | 61 | getInteractiveMultiPlotState: function() { |
62 | + if (!this.multiPlotCheck) | |
63 | + return false; | |
62 | 64 | return this.multiPlotCheck.getValue(); |
63 | 65 | }, |
64 | 66 | |
... | ... | @@ -253,8 +255,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
253 | 255 | xText = parseFloat(amdaPlotComp.PlotContextManager.toAxisValue(axis, panel.plotArea.x, panel.plotArea.x+panel.plotArea.width, sourceXPos).toPrecision(2)); |
254 | 256 | break; |
255 | 257 | case 'epochAxis' : |
256 | - // | |
257 | - xText = 'ToDo'; | |
258 | + xText = parseFloat(amdaPlotComp.PlotContextManager.toAxisValue(axis, panel.plotArea.x, panel.plotArea.x+panel.plotArea.width, sourceXPos).toPrecision(2)); | |
258 | 259 | break; |
259 | 260 | } |
260 | 261 | |
... | ... | @@ -367,18 +368,21 @@ Ext.define('amdaUI.PlotTabResultUI', { |
367 | 368 | |
368 | 369 | this.crtTTFileIndex = configResult.ttFileIndex; |
369 | 370 | |
370 | - if (this.isTTNavBar != (!configResult.isInterval)) | |
371 | + if (this.isTTNavBar != (!configResult.isInterval) || (this.isSuperposeMode != this.crtContext.page.superposeMode)) | |
371 | 372 | { |
372 | 373 | //Update navigation bar |
373 | - this.updateNavToolBar(!configResult.isInterval); | |
374 | + this.updateNavToolBar(!configResult.isInterval, this.crtContext.page.superposeMode); | |
374 | 375 | } |
375 | 376 | |
376 | 377 | this.updateTimeTableInfo(); |
377 | 378 | |
378 | - this.disableSynchronize = true; | |
379 | - this.multiPlotCheck.setValue(configResult.multiplot); | |
380 | - this.disableSynchronize = false; | |
381 | - | |
379 | + if (this.multiPlotCheck) | |
380 | + { | |
381 | + this.disableSynchronize = true; | |
382 | + this.multiPlotCheck.setValue(configResult.multiplot); | |
383 | + this.disableSynchronize = false; | |
384 | + } | |
385 | + | |
382 | 386 | this.panelImage.setSrc(this.getImageUrl(configResult.folder, configResult.plotFile)); |
383 | 387 | |
384 | 388 | var size = this.getImageSize(); |
... | ... | @@ -436,7 +440,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
436 | 440 | },this); |
437 | 441 | }, |
438 | 442 | |
439 | - updateNavToolBar : function(isTimeTable) { | |
443 | + updateNavToolBar : function(isTimeTable, isSuperposeMode) { | |
440 | 444 | if (this.navToolBar) |
441 | 445 | this.navToolBar.removeAll(true); |
442 | 446 | |
... | ... | @@ -634,7 +638,10 @@ Ext.define('amdaUI.PlotTabResultUI', { |
634 | 638 | else |
635 | 639 | this.navToolBar.add(toolItemsCfg); |
636 | 640 | |
641 | + this.navToolBar.setDisabled(isSuperposeMode); | |
642 | + | |
637 | 643 | this.isTTNavBar = isTimeTable; |
644 | + this.isSuperposeMode = isSuperposeMode; | |
638 | 645 | }, |
639 | 646 | |
640 | 647 | init: function(configResult){ |
... | ... | @@ -686,14 +693,17 @@ Ext.define('amdaUI.PlotTabResultUI', { |
686 | 693 | items: [] |
687 | 694 | }); |
688 | 695 | |
689 | - this.updateNavToolBar(!configResult.isInterval); | |
696 | + this.updateNavToolBar(!configResult.isInterval, this.crtContext.page.superposeMode); | |
690 | 697 | |
691 | 698 | this.updateTimeTableInfo(); |
692 | 699 | |
693 | - this.disableSynchronize = true; | |
694 | - this.multiPlotCheck.setValue(configResult.multiplot); | |
695 | - this.disableSynchronize = false; | |
696 | - | |
700 | + if (this.multiPlotCheck) | |
701 | + { | |
702 | + this.disableSynchronize = true; | |
703 | + this.multiPlotCheck.setValue(configResult.multiplot); | |
704 | + this.disableSynchronize = false; | |
705 | + } | |
706 | + | |
697 | 707 | var plotResultTabPanelConfig = { |
698 | 708 | preventHeader : true, |
699 | 709 | autoScroll: true, |
... | ... |