Ignore:
Timestamp:
Mar 24, 2010, 12:51:51 AM (15 years ago)
Author:
sommeria
Message:

gestion of projection objects improved. Implementation of view_field.fig
introduction of a circle to mark vectors with the mouse
various cleaning and debugging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_motion.m

    r60 r61  
    3939test_create=0;%default
    4040test_edit=0;%default
    41 if isfield(handles,'VOLUME') % mouse_motion not applied to the uvmat figure, no object creation
    42     test_create=get(handles.create,'Value');   
    43 end
     41% if isfield(handles,'VOLUME') % mouse_motion not applied to the uvmat figure, no object creation
     42%     test_create=get(handles.create,'Value');   
     43% end
    4444test_edit=isfield(handles,'edit') & get(handles.edit,'Value');% edit test for mouse shap: an arrow
    4545test_zoom=isfield(handles,'zoom')& get(handles.zoom,'Value');% edit test for mouse shap: an arrow
     
    9292                        if ~test_create
    9393                            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
    94101                        end
    95102                        ivec=ivec(1);%choice the first selected vector if several are selected
     
    194201%%%%%%%%%%%%%%%%%
    195202%create or modify an object
    196 if isfield(AxeData,'CurrentObject') & ishandle(AxeData.CurrentObject) & isfield(AxeData,'Drawing') & ~isequal(AxeData.Drawing,'off')
     203huvmat=findobj(allchild(0),'Name','uvmat');%find the uvmat interface handle
     204if ~isempty(huvmat)
     205    UvData=get(huvmat,'UserData');
     206end
     207if ~isempty(huvmat) & isfield(AxeData,'CurrentObject') & ishandle(AxeData.CurrentObject) & isfield(AxeData,'Drawing') & ~isequal(AxeData.Drawing,'off')
    197208    PlotData=get(AxeData.CurrentObject,'UserData');
    198209    huvmat=findobj(allchild(0),'Name','uvmat');%find the uvmat interface handle
     
    268279
    269280%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
     281if ~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
    277290end
    278291set(currentfig,'Pointer',pointershape);
Note: See TracChangeset for help on using the changeset viewer.