disableDef​aultIntera​ctivity with GeographicAxes bug?

조회 수: 1 (최근 30일)
Jon Martinez
Jon Martinez 2021년 5월 4일
편집: Adam Danz 2021년 5월 5일
I'm trying to stop a GeographicAxes from panning while I interact with it using disableDefaultInteractivity. According to the documentation the target for this function can be an Axes, PolarAxes or GeographicAxes Object
However, the function internally does not accept GeographicAxes:
function disableDefaultInteractivity(ax)
%DISABLEDEFAULTINTERACTIVITY turns off default interactivity
% DISABLEDEFAULTINTERACTIVITY(AXES) turns off default interactivity on
% given axes, uiaxes or polaraxes
% Copyright 2018 The MathWorks, Inc.
narginchk(1,1);
if isa(ax,'matlab.graphics.axis.Axes') || ...
isa(ax,'matlab.ui.control.UIAxes') || ...
isa(ax,'matlab.graphics.axis.PolarAxes')
ax.InteractionContainer.Enabled = 'off';
else
error(message('MATLAB:graphics:interaction:InvalidInputAxes'));
end
It seems the documentation contradicts the implementation: someone switched GeographicAxes for UIAxes. I can manually avoid this function and call:
myAx = geoaxes;
myAx.InteractionContainer.Enabled = 'off';
but I don't think this is the intended implementation. Either the function or the documentation (or both) should be updated.

답변 (1개)

Adam Danz
Adam Danz 2021년 5월 4일
편집: Adam Danz 2021년 5월 5일
Indeed geo axes are listed as accepted axes in the disableDefaultInteractivity r2019b documentation.
Double check that you're using r19b (type ver in the command window) and if that's confirmed, contact tech support and let us know what they say: Contact Us - MATLAB & Simulink
It's definitely supported in r2021a.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by