Can the default behavior of selected annotations be changed to avoid unwanted movement?

A common occurence in Figure manipulation is selecting an object (e.g. arrow, textbox, etc) for editting in the property inspector or in the command window with gco.
Recent versions of MATLAB now link the objects position to the cursor after the first click, unless a second click "fixes" the object in place. This is very cumbersome, because any mouse motion before that second click (like moving the cursor to the property inspector) accidently moves the object.
Is there any way to revert this setting?

4 commentaires

Please provide a small example of an object that exhibits this interact behavior. I could not reproduce it using
figure
plot(1:10)
x = [0.3 0.5];
y = [0.6 0.5];
annotation('textarrow',x,y,'String','y = x ')
Okay, this appears to happen when selecting an object after another winow is active.
The following steps recreate the behavior for me:
  1. Run the code
  2. Open property inspector
  3. Select the Arrowhead (should behave normally, doesn't move with mouse)
  4. Click anywhere else in figure to deselect arrow
  5. Click anywhere in property inspector
  6. Select the Arrowhead again, then move the cursor. Arrowhead moves without a second click.
Thanks for the help!
Did you forget to attach the code?
I tried your steps with the snippet I shared but couldn't reproduce the results. Does this continue to happen after you restart MATLAB?
Yes, using your code snippet.
This does occur for me after a fresh start of MATLAB, on at least two machines. The one I have access to right now is 2022a.
They do share a common startup file I use, I will have to check if it occurs without that.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Graphics Object Properties dans Centre d'aide et File Exchange

Produits

Version

R2023a

Commenté :

le 15 Avr 2023

Community Treasure Hunt

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

Start Hunting!

Translated by