Panning in Simulink has annoying "Inertia" (for lack of a better word)
29 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (2 件)
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.
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
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
2025 年 5 月 18 日
Yeah, you're right - I have misread the documentation. I'll update my answer.
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
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
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 Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!