Add option to restrict edge panning to camera viewport
Adds a new configurable option to make edge panning respect a camera's viewport instead of the full window. When enabled, edge pan calculations use the viewport's physical size and position, translate the cursor into viewport space, and ignore edge panning if the cursor lies outside the viewport. The default remains window-wide behavior.
This allows edge panning to behave correctly for cameras with sub-window viewports (e.g., split screens or UI panels) and prevents unintended panning when the cursor is outside a camera's viewport.
Hey, sorry for delay. I tested this and it doesn't work for me. As in, it still only pans at the edge of the window, not the edge of the viewport. I haven't looked into it yet, but I wanted to let you know I haven't forgotten about this, just been busy.
I have recorded a short video showing how the new example behaves with the setting on and then off (current behaviour). This is on a Windows 11 machine
Hmm, so I'm on Mac and this is what it does. It's interesting that the bottom edge doesn't do anything. Might be a clue. Sorry haven't had a chance to properly debug yet.
https://github.com/user-attachments/assets/05b1fb07-f3aa-4256-9aef-a25131f6d4a9
I can recreate the behavior you see, on a Linux machine I now have access to, I will dig into it further
Seems unrelated to platform, and instead related to display scaling, my windows machine is at 100% scaling, the linux machine is at 200% scaling. The viewport is always in physical pixels, but the existing panning was all using logical pixels.