Changeset 60 for trunk/src/mouse_motion.m
- Timestamp:
- Mar 23, 2010, 2:52:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r11 r60 27 27 return 28 28 end 29 if ~isfield(handles, 'mouse_coord') 30 return 31 end 32 if ~ishandle(handles.mouse_coord) 33 return 34 end 35 proj_coord=get(handles.mouse_coord,'String'); 36 choice=get(handles.mouse_coord,'Value'); 37 if ~isempty(proj_coord); proj_coord=proj_coord{choice};else;proj_coord=[];end; 29 % if ~isfield(handles, 'mouse_coord') 30 % 'TEST' 31 % return 32 % end 33 % if ~ishandle(handles.mouse_coord) 34 % return 35 % end 36 % proj_coord=get(handles.mouse_coord,'String'); 37 % choice=get(handles.mouse_coord,'Value'); 38 % if ~isempty(proj_coord); proj_coord=proj_coord{choice};else;proj_coord=[];end; 38 39 test_create=0;%default 39 40 test_edit=0;%default … … 148 149 if isfield(AxeData,'CoordUnit') 149 150 mouse.CoordUnit=AxeData.CoordUnit; 150 end 151 if isfield(mouse,'CoordType') &~isequal(mouse.CoordType,proj_coord) 152 huvmat=findobj(allchild(0),'Tag','uvmat');%find the uvmat interface handle 153 UvData=get(huvmat,'UserData'); %coord transformed stored in the uvmat interface, updated by file input 154 if isfield(AxeData,'CoordType') 155 mouse.CoordType=AxeData.CoordType; 156 end 157 if isfield(AxeData,'dt') 158 mouse.dt=AxeData.dt; 159 end 160 % if ~isempty(z_mouse) 161 % mouse.Z=z_mouse; 162 % end 163 if length(ivec)>0 %& isfield(AxeData,'dt') 164 mouse.U=u_mouse; 165 mouse.V=v_mouse; 166 end 167 mouse=feval(proj_coord,mouse,UvData);%apply transform proj_coord to the position 168 if length(ivec)>0%& isfield(AxeData,'dt') 169 u_mouse=mouse.U; 170 v_mouse=mouse.V; 171 end 172 end 151 end 173 152 if isfield(mouse,'CoordType') 174 153 if isequal(mouse.CoordType,'px') … … 203 182 text_displ_2=['A=' num2str(double(A_mouse)) ',i=' num2str(indx0) ',j=' num2str(indy0)]; 204 183 end 205 elseif isequal( get(hchild(ichild),'Visible'),'on')& ~isequal(get(hchild(ichild),'Style'),'frame')184 elseif isequal(htype,'uicontrol') && isequal(get(hchild(ichild),'Visible'),'on')&& ~isequal(get(hchild(ichild),'Style'),'frame') 206 185 text_displ_1=get(hchild(ichild),'Tag'); 207 186 end … … 287 266 pointershape='arrow'; 288 267 end 268 269 %draw ruler 270 UvData=get(handles.uvmat,'UserData'); 271 if isfield(UvData,'MouseAction') && isequal(UvData.MouseAction,'ruler') 272 if isfield(UvData,'RulerHandle') 273 RulerCoord=[UvData.RulerCoord ;xy(1,1:2)]; 274 set(UvData.RulerHandle,'XData',RulerCoord(:,1)); 275 set(UvData.RulerHandle,'YData',RulerCoord(:,2)); 276 end 277 end 289 278 set(currentfig,'Pointer',pointershape);
Note: See TracChangeset
for help on using the changeset viewer.