Panning in Simulink has annoying "Inertia" (for lack of a better word)

29 ビュー (過去 30 日間)
Cyrus Nolan
Cyrus Nolan 2024 年 2 月 18 日
コメント済み: Staffan Molinder 2025 年 6 月 19 日 7:27
When I pan in simulink using space+left mouse or middle mouse and I'm still panning or just stopped panning when I let go of the button, panning continues, decelerating to a stop rather than stopping right when I let go of the button. I have to stop panning for around 1 second before letting go of the button to avoid this, which for me is quite annoying. I'd like panning to stop right when I let go of the button. Is there a fix for this?

回答 (2 件)

Fryderyk Kukowski
Fryderyk Kukowski 2025 年 5 月 4 日
編集済み: Fryderyk Kukowski 2025 年 5 月 18 日
Yeah, I hate it too.
I can't help you directly as I haven't found an option in MATLAB to disable this behaviour.
But if you're a AutoHotKey (AHK) user or wish to install it then I have a workaround for you.
I have created a script that when the Simulink window is active remaps Middle Mouse Button (MButton) to send Space + Left Mouse Button (LButton) and on release of MButton it releases the Space first so there is no innertia.
I tested it and it works pretty well - I'm expirencing no innertia when I release MButton.
I have included 2 versions of the script - 1 for the AHK v1.1 and 2 for AHK v2. If you haven't installed AHK yet I suggest you download the v2 version as this the main version of AHK now and v1.1 is deprecated.
If you try it out let me know if the script is working as I am not sure if the WinTitle selector "Simulink ahk_exe MATLAB.exe" is specific enough - it may catch some other MATLAB windows. But it is not a big problem as MButton is hardly ever used outside of the Simulink model editor.
If you have any questions - feel free to ask :)
UPDATE:
I have reuploaded the corrected Simulink_No_Inertia.zip including Ben's fix.
  2 件のコメント
Ben
Ben 2025 年 5 月 15 日
Thank you!
For AHK 2 I had to change the HotWin line to
#HotIf WinActive("Simulink ahk_exe MATLAB.exe")
It was running in all windows with the original
HotIfWinActive "Simulink ahk_exe MATLAB.exe"
Fryderyk Kukowski
Fryderyk Kukowski 2025 年 5 月 18 日
Yeah, you're right - I have misread the documentation. I'll update my answer.

サインインしてコメントする。


nick
nick 2024 年 3 月 1 日
Hi Cyrus,
I understand that you are looking for a way to curtail the panning as soon as you release the button.
To accomplish this, you should release spacebar key before releasing left click when you are simultaneously holding spacebar key and left mouse button. This will immediately stop the panning in simulink.
Hope this helps
  5 件のコメント
Walter Roberson
Walter Roberson 2024 年 12 月 13 日
While this response is helpful, it is by no means an answer or fix to the question and is simply an annoying work-around. Having to press spacebar in between every pan move is not an acceptable way to pan around large Simulink drawings. This issue is making me consider going to previous versions of Matlab for daily work; this post does not provide closure.
Staffan Molinder
Staffan Molinder 2025 年 6 月 19 日 7:27
@Walter Roberson Yeah I am also considering downgrading to some previous version. Jumped from 2022a to 2025a.
Can come Mathworks person provide any feedback on if this is due for a fix soon?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by