Changeset 61 for trunk/src/mouse_motion.m
- Timestamp:
- Mar 24, 2010, 12:51:51 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r60 r61 39 39 test_create=0;%default 40 40 test_edit=0;%default 41 if isfield(handles,'VOLUME') % mouse_motion not applied to the uvmat figure, no object creation42 test_create=get(handles.create,'Value');43 end41 % if isfield(handles,'VOLUME') % mouse_motion not applied to the uvmat figure, no object creation 42 % test_create=get(handles.create,'Value'); 43 % end 44 44 test_edit=isfield(handles,'edit') & get(handles.edit,'Value');% edit test for mouse shap: an arrow 45 45 test_zoom=isfield(handles,'zoom')& get(handles.zoom,'Value');% edit test for mouse shap: an arrow … … 92 92 if ~test_create 93 93 pointershape='arrow'; %mouse indicates the detection of a vector 94 hhh=findobj(haxes,'Tag','vector_marker'); 95 if isempty(hhh) 96 line(AxeData.X(ivec),AxeData.Y(ivec),'Color','m','Tag','vector_marker','LineStyle','.','Marker','o','MarkerSize',AxeData.Mesh); 97 else 98 set(hhh,'XData',AxeData.X(ivec)) 99 set(hhh,'YData',AxeData.Y(ivec)) 100 end 94 101 end 95 102 ivec=ivec(1);%choice the first selected vector if several are selected … … 194 201 %%%%%%%%%%%%%%%%% 195 202 %create or modify an object 196 if isfield(AxeData,'CurrentObject') & ishandle(AxeData.CurrentObject) & isfield(AxeData,'Drawing') & ~isequal(AxeData.Drawing,'off') 203 huvmat=findobj(allchild(0),'Name','uvmat');%find the uvmat interface handle 204 if ~isempty(huvmat) 205 UvData=get(huvmat,'UserData'); 206 end 207 if ~isempty(huvmat) & isfield(AxeData,'CurrentObject') & ishandle(AxeData.CurrentObject) & isfield(AxeData,'Drawing') & ~isequal(AxeData.Drawing,'off') 197 208 PlotData=get(AxeData.CurrentObject,'UserData'); 198 209 huvmat=findobj(allchild(0),'Name','uvmat');%find the uvmat interface handle … … 268 279 269 280 %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 281 if ~isempty(huvmat) 282 UvData=get(huvmat,'UserData'); 283 if isfield(UvData,'MouseAction') && isequal(UvData.MouseAction,'ruler') 284 if isfield(UvData,'RulerHandle') 285 RulerCoord=[UvData.RulerCoord ;xy(1,1:2)]; 286 set(UvData.RulerHandle,'XData',RulerCoord(:,1)); 287 set(UvData.RulerHandle,'YData',RulerCoord(:,2)); 288 end 289 end 277 290 end 278 291 set(currentfig,'Pointer',pointershape);
Note: See TracChangeset
for help on using the changeset viewer.