Changeset 187 for trunk/src/mouse_motion.m
- Timestamp:
- Feb 1, 2011, 1:07:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r173 r187 28 28 return 29 29 end 30 currentfig=hObject; 30 FigData=get(hObject,'UserData'); 31 if ishandle(FigData)% case of a zoom plot, the handle of the parent rectangle is stored in UserData, its parent is the plotting axes of the rectangle 32 currentfig=get(get(FigData,'parent'),'parent'); 33 else 34 currentfig=hObject;%usual plot 35 end 31 36 hhcurrentfig=guidata(currentfig); 32 37 test_zoom=get(hhcurrentfig.zoom,'Value');%test for zoom activated on the current figure … … 61 66 pointershape='arrow';% default pointer is an arrow 62 67 63 xy_fig=get( currentfig,'CurrentPoint');% current point of the current figure (gcbo)64 hchild=get( currentfig,'Children');%handles of all objects in the current figure68 xy_fig=get(hObject,'CurrentPoint');% current point of the current figure (gcbo) 69 hchild=get(hObject,'Children');%handles of all objects in the current figure 65 70 66 71 %% loop on all the objects in the current figure and detect whether the mouse is over a plot axes … … 74 79 htype=get(hchild(ichild),'Type');%type of the crrent child 75 80 %if the mouse is over an axis, look at the data 76 if isequal(htype,'axes')81 if strcmp(htype,'axes') 77 82 haxes=hchild(ichild); 78 83 xy=get(haxes,'CurrentPoint');%xy(1,1),xy(1,2): current x,y positions in axes coordinates … … 144 149 VarName=Field.ListVarName{CellVarIndex{icell}(1)}; 145 150 eval(['nxy=size(Field.' VarName ');']); 146 % nxy(1)=numel(y);147 % nxy(2)=numel(x);148 151 MaxAY=max(y(1),y(end)); %#ok<COLND> 149 152 MinAY=min(y(1),y(end)); %#ok<COLND>
Note: See TracChangeset
for help on using the changeset viewer.