Hi, I am creating a figure and customize the pan-function:
function hFig = mouse_figure
'WindowButtonDownFcn' , @pan_click,...
'WindowButtonUpFcn' , @pan_release,...
'WindowButtonMotionFcn', @pan_motion);
Then in the caller workspace, I need to update the WindowButtonMotionFcn to a new function that incorporate more arguments and do more stuffs. However, after the figure was shown, I found that the WindowButtonMotionFcn was not called as expected. Instead, it is still calling the original pan_motion. Is there something wrong with the code?
set(f,'WindowButtonMotionFcn', @(~,~) pan_motion_driftPatchTextObjs(f,panHor,panVer,aYTopTextPatchCollects,aXLeftTextPatchCollects));