Filter löschen
Filter löschen

disableDef​aultIntera​ctivity with GeographicAxes bug?

2 Ansichten (letzte 30 Tage)
Jon Martinez
Jon Martinez am 4 Mai 2021
Bearbeitet: Adam Danz am 5 Mai 2021
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.

Antworten (1)

Adam Danz
Adam Danz am 4 Mai 2021
Bearbeitet: Adam Danz am 5 Mai 2021
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.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by