vis_footnotebuttondownfcn.m

来自「此源码提供了ssvm的完整的matlab源代码」· M 代码 · 共 65 行

M
65
字号
function vis_footnoteButtonDownFcn% VIS_FOOTNOTEBUTTONDOWNFCN Callback set by VIS_FOOTNOTE%%  som_showtitleButtonDownFcn%% Moves the axis of current callback object using DRAGRECT% command. This callback is set to all texts added to figures by % VIS_FOOTNOTE function.%% See also DRAGRECT, SOM_SHOWTITLE.% Copyright (c) 1997-2000 by the SOM toolbox programming team.% http://www.cis.hut.fi/projects/somtoolbox/             % Version 2.0beta Johan 080698% Action[txt,fig]=gcbo;                     % Get text and figure handlesax=get(txt,'parent');               % Get axis handlememunits_fig=get(fig,'units');      % Get figure size in pixelsset(gcf,'units','pixels'); pos_fig=get(fig,'position');        memunits_txt=get(txt,'units');      % Get text field size in pixelsset(txt,'units','pixels');            text_size=get(txt,'extent');memunits_ax=get(ax,'units');        % Get axis position in pixelsset(ax,'units','pixels');          pos_ax=get(ax,'position');%%% Move textpos_final=dragrect([pos_ax(1:2) text_size(3:4)]);%%% Keep the text inside the figure!pos_final(1)=max(pos_final(1),0);pos_final(2)=max(pos_final(2),0);pos_final(1)=min(pos_final(1),pos_fig(3)-text_size(3));pos_final(2)=min(pos_final(2),pos_fig(4)-text_size(4));%%% Set new positionnew_pos=[pos_final(1:2) pos_ax(3:4)];set(ax,'position', new_pos);%%% Set the text on the top of the object stack children=get(gcf,'children');i=find(ismember(children,ax));new_i=[i 1:i-1 i+1:length(children)];set(gcf,'children',children(new_i));set(txt,'position',[0 0 0]);set(fig,'units',memunits_fig);set(ax,'units',memunits_ax);set(txt,'units',memunits_txt);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?