|
1 | 1 | function [h_pan,h_zoom,h_cursor] = turnOffFigureSelection(h) |
| 2 | +<<<<<<< HEAD |
2 | 3 | % turnOffFigureSelection - Turn off zoom, pan and datacursor |
3 | 4 | % |
4 | 5 | % syntax: [h_pan,h_zoom,h_cursor] = turnOffFigureSelection(h) |
|
33 | 34 | h_z = zoom(h.fig); |
34 | 35 | h_z.Enable = 'off'; |
35 | 36 | end |
| 37 | +======= |
| 38 | +% turnOffFigureSelection - Turn off zoom, pan and datacursor |
| 39 | +% |
| 40 | +% syntax: [h_pan,h_zoom,h_cursor] = turnOffFigureSelection(h) |
| 41 | +% h - structure holding references to GUI interface |
| 42 | +% h_pan - reference to pan object |
| 43 | +% h_zoom - reference to zoom buttons |
| 44 | +% h_cursor - reference to datacrusor object |
| 45 | +% |
| 46 | + |
| 47 | +%-------------------------------------------------------------------------- |
| 48 | +% This file is part of StatSTEM |
| 49 | +% |
| 50 | +% Copyright: 2016, EMAT, University of Antwerp |
| 51 | +% License: Open Source under GPLv3 |
| 52 | +% Contact: sandra.vanaert@uantwerpen.be |
| 53 | +%-------------------------------------------------------------------------- |
| 54 | + |
| 55 | +% Determine Matlab version for compatibility |
| 56 | +v = version('-release'); |
| 57 | +v = str2double(v(1:4)); |
| 58 | + |
| 59 | +% First turn off zoom, pan and datacursor |
| 60 | +h_pan = pan(h.fig); |
| 61 | +h_zoom = [h.zoom.in;h.zoom.out]; |
| 62 | +h_cursor = datacursormode(h.fig); |
| 63 | +h_cursor.removeAllDataCursors(); |
| 64 | +set(h_pan,'Enable','off') |
| 65 | +set(h_cursor,'Enable','off') |
| 66 | + |
| 67 | +if v < 2019 |
| 68 | + zoomAxinFig(h,'off') |
| 69 | +else |
| 70 | + h_z = zoom(h.fig); |
| 71 | + h_z.Enable = 'off'; |
| 72 | +>>>>>>> upstream/master |
36 | 73 | end |
0 commit comments