Effacer les filtres
Effacer les filtres

disableDef​aultIntera​ctivity with GeographicAxes bug?

2 vues (au cours des 30 derniers jours)
Jon Martinez
Jon Martinez le 4 Mai 2021
Modifié(e) : Adam Danz le 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.

Réponses (1)

Adam Danz
Adam Danz le 4 Mai 2021
Modifié(e) : Adam Danz le 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.

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by