Unable to disable axes interactions

9 visualizaciones (últimos 30 días)
Paul Keselman
Paul Keselman el 1 de Jun. de 2020
Comentada: Gouri Chennuru el 13 de Jul. de 2020
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.

Respuestas (1)

Gouri Chennuru
Gouri Chennuru el 10 de Jul. de 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)
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 comentarios
Paul Keselman
Paul Keselman el 10 de Jul. de 2020
Hi Gouri,
Thank you for looking into this matter. Before I disable interactions I am able to pan the plot by interacting with the X and Y axis object (no need to use the toolbar). The ax.Interactions = []; disables everything as expected, including the interactions with the X and Y axis. However, after I toggle the pan on the toolbar (On and Off), I am now able to pan the plot by interacting with the X and Y axis (and afterwards I am also able to pan even when interacting with the main plot area). The key is panning by interacting with the X and Y axis and not the main plot area.
Thanks,
Paul
Gouri Chennuru
Gouri Chennuru el 13 de Jul. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by