Panning in Simulink has annoying "Inertia" (for lack of a better word)
24 次查看(过去 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
6 个评论
Staffan Molinder
2025-6-19
@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?
Corey
2025-7-17
agreed!! i have no idea who would WANT inertia on simulink panning! please add a specific setting to remove this. Right now the setting can be turned off by disabling the simulink preference for Smart Editing Features, but that also turns off the ability to quick insert blocks.... why would those be coupled??
另请参阅
类别
在 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!