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?

回答(2 个)

Fryderyk Kukowski
编辑: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"

请先登录,再进行评论。


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
  6 个评论
Staffan Molinder
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
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 CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by