![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/329843/image.png)
Unable to disable axes interactions
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I would like to disable all default uiaxes interactions and only be able to interact with the axes through the toolbar. Here is my code for doing so:
fig = uifigure;
ax = uiaxes(fig);
ax.Interacations = [];
This works as expected. However, after I pan my axes from the toolbar (toggle the hand icon to on -- pan -- toggle the hand icon to off), the interactions get re-enabled with the ruler objects and after I interact with the ruler object I am able to repeat the pan while interacting with the main axes object.
To me this seems like a bug.
Thanks.
0 commentaires
Réponses (1)
Gouri Chennuru
le 10 Juil 2020
Hi Paul,
I am assuming that you are using MATLAB R2020a, I couldn't reproduce the issue, I tried following the below steps,
Initially I executed,
fig = uifigure;
ax = uiaxes(fig);
This works fine and all the default interactions are also working fine. Default Interactions are built into the axes and are available through gestures, such as dragging to pan or scrolling to zoom.
In the next step I executed,
ax.Interactions = [];
This also works fine, the default interactions are disabled as expected, Only the default interactions are disabled not the toolbar interactions. (Toolbar interactions are available through the axes toolbar as shown)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/329843/image.png)
On checking the toolbar interactions(tried Pan on and off) they are working fine but the default interactions are not enabled as expected thus, not able to reproduce the issue you have got.
Can you provide additional information so that I will try to reproduce this issue?
2 commentaires
Gouri Chennuru
le 13 Juil 2020
Hi Paul,
I am able to reproduce the issue.
I have brought this issue to the concerned people and it might be considered in any future release.
Voir également
Catégories
En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!