Changeset 625 for trunk/src/keyboard_callback.m
- Timestamp:
- May 2, 2013, 7:51:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/keyboard_callback.m
r622 r625 3 3 function keyboard_callback(hObject,eventdata,handleshaxes) 4 4 cur_axes=get(hObject,'CurrentAxes');%current plotting axes of the figure with handle hObject 5 if ~isempty(eventdata) && isnumeric(eventdata)6 xx=eventdata; % keyboard_callback called by mouse_down7 else8 5 xx=double(get(hObject,'CurrentCharacter')); %get the keyboard character 9 end10 6 switch xx 11 7 case {29,28,30,31} %arrows for displacement 8 AxeData=get(cur_axes,'UserData'); 9 if isfield(AxeData,'ZoomAxes')&&ishandle(AxeData.ZoomAxes) 10 cur_axes=AxeData.ZoomAxes;% move the field of the zoom sub-plot instead of the main axes if it exsits 11 axes(cur_axes) 12 end 12 13 if ~isempty(cur_axes) 13 14 xlimit=get(cur_axes,'XLim'); … … 33 34 rect([3 4])=[xlimit(2)-xlimit(1) ylimit(2)-ylimit(1)]; 34 35 set(hparentrect,'Position',rect) 35 hfig=get(hparentrect,'parent');36 hfig=get(hfig,'parent');37 36 elseif isfield(AxeData,'LimEditBox')&& isequal(AxeData.LimEditBox,1)% update display of the GUI containing the axis (uvmat or view_field) 38 37 hh=guidata(hfig);
Note: See TracChangeset
for help on using the changeset viewer.