Changeset 210 for trunk/src/mouse_up.m
- Timestamp:
- Feb 28, 2011, 11:29:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_up.m
r204 r210 248 248 end 249 249 250 %% zoom in by a factor 2 if no new figure is created250 %% zoom in or out by a factor 2 if no new figure is created 251 251 if test_zoom 252 252 xy=get(currentaxes,'CurrentPoint');%xy(1,1),xy(1,2): current x,y positions in axes coordinates 253 253 xlim=get(currentaxes,'XLim'); 254 254 ylim=get(currentaxes,'YLim'); 255 if isequal(get(currentfig,'SelectionType'),'normal');%if left button has been pressed 255 if isequal(get(currentfig,'SelectionType'),'normal');%if left button has been pressed, zoom in by a factor of 2 256 256 xlim(1)=0.5*xy(1,1)+0.5*xlim(1); 257 257 xlim(2)=0.5*xy(1,1)+0.5*xlim(2); … … 268 268 % ylim_new(1)=(1+alpha)*ylim(1)/2+(1-alpha)*ylim(2)/2; 269 269 % ylim_new(2)=(1-alpha)*ylim(1)/2+(1+alpha)*ylim(2)/2; 270 if isfield(AxeData,'RangeX') 270 if isfield(AxeData,'RangeX')&& isfield(AxeData,'RangeY') 271 271 xlim(1)=max(AxeData.RangeX(1),xlim(1)); 272 272 xlim(2)=min(AxeData.RangeX(2),xlim(2)); … … 276 276 set(hhuvmat.zoom,'Value',0) 277 277 set(hhuvmat.zoom,'BackgroundColor',[0.7 0.7 0.7]) 278 set(hhuvmat.Fix edLimits,'Value',0)279 set(hhuvmat.Fix edLimits,'BackgroundColor',[0.7 0.7 0.7])278 set(hhuvmat.FixLimits,'Value',0) 279 set(hhuvmat.FixLimits,'BackgroundColor',[0.7 0.7 0.7]) 280 280 end 281 281 end
Note: See TracChangeset
for help on using the changeset viewer.