Ignore:
Timestamp:
May 2, 2013, 7:51:42 PM (8 years ago)
Author:
sommeria
Message:

system of object creation by mouse ilmproved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/keyboard_callback.m

    r622 r625  
    33function keyboard_callback(hObject,eventdata,handleshaxes)
    44cur_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_down
    7 else
    85xx=double(get(hObject,'CurrentCharacter')); %get the keyboard character
    9 end
    106switch xx
    117    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
    1213        if ~isempty(cur_axes)
    1314            xlimit=get(cur_axes,'XLim');
     
    3334                rect([3 4])=[xlimit(2)-xlimit(1) ylimit(2)-ylimit(1)];
    3435                set(hparentrect,'Position',rect)
    35                 hfig=get(hparentrect,'parent');
    36                 hfig=get(hfig,'parent');
    3736            elseif isfield(AxeData,'LimEditBox')&& isequal(AxeData.LimEditBox,1)% update display of the GUI containing the axis (uvmat or view_field)
    3837                hh=guidata(hfig);
Note: See TracChangeset for help on using the changeset viewer.