Changeset 65 for trunk/src/mouse_motion.m
- Timestamp:
- Mar 24, 2010, 8:47:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r61 r65 89 89 (AxeData.Y<(xy(1,2)+AxeData.Mesh/3) & AxeData.Y>(xy(1,2)-AxeData.Mesh/3));%f 90 90 ivec=find(flag_vec);% search the selected vector index ivec 91 hhh=findobj(haxes,'Tag','vector_marker'); 91 92 if length(ivec)>0 93 %ivec=ivec(1);%choice the first selected vector if several are selected 92 94 if ~test_create 93 95 pointershape='arrow'; %mouse indicates the detection of a vector 94 hhh=findobj(haxes,'Tag','vector_marker');96 95 97 if isempty(hhh) 96 line(AxeData.X(ivec),AxeData.Y(ivec),'Color','m','Tag','vector_marker','LineStyle','.','Marker','o','MarkerSize',AxeData.Mesh); 98 set(currentfig,'CurrentAxes',haxes) 99 rectangle('Curvature',[1 1],... 100 'Position',[AxeData.X(ivec)-AxeData.Mesh AxeData.Y(ivec)/2-AxeData.Mesh/2 AxeData.Mesh AxeData.Mesh],'EdgeColor','m',... 101 'LineStyle','-','Tag','vector_marker'); 102 % line(AxeData.X(ivec),AxeData.Y(ivec),'Color','m','Tag','vector_marker','LineStyle','.','Marker','o','MarkerSize',AxeData.Mesh); 97 103 else 98 set(hhh,'XData',AxeData.X(ivec)) 99 set(hhh,'YData',AxeData.Y(ivec)) 104 set(hhh,'Position',[AxeData.X(ivec)-AxeData.Mesh/2 AxeData.Y(ivec)-AxeData.Mesh/2 AxeData.Mesh AxeData.Mesh]) 100 105 end 101 end 102 ivec=ivec(1);%choice the first selected vector if several are selected 106 end 103 107 mouse.X=AxeData.X(ivec); 104 108 mouse.Y=AxeData.Y(ivec); … … 106 110 v_mouse=AxeData.V(ivec); 107 111 w_mouse=0; %default 108 if isfield(AxeData,'W') &length(AxeData.W)>=ivec112 if isfield(AxeData,'W') & length(AxeData.W)>=ivec 109 113 w_text=[', w=' num2str(AxeData.W(ivec),3)]; 110 114 else … … 124 128 else 125 129 ff_text=''; 130 end 131 else 132 if ~isempty(hhh) 133 delete(hhh) 126 134 end 127 135 end
Note: See TracChangeset
for help on using the changeset viewer.