Kragrathea / OctoPrint-PrettyGCode

114 stars 20 forks source link

Feature Request: Swap Mouse Buttons Toggle? #130

Open Durahl opened 2 years ago

Durahl commented 2 years ago

Greetings!

I've been using PGC for a while now, but I still can't get over the fact that the PAN is bound to the LMB while ORBIT is bound to the RMB - The total opposite to how navigating the 3D Workspace in my CAD Software of choice works 😖

Can we maybe get a checkbox or something similar to swap those two navigation controls? And while not necessary for me maybe also a reverse Mouse Wheel option for ZOOM?

Cheers! 🙂

Kragrathea commented 2 years ago

The control scheme matches Cura, that seemed to be the best default option. It would require a lot of extra code to expose an option that few would use. But if you are ok making a simple modification to the code you could set it the way you like it.

Look in camera-controls.js for the comment that says "match CURA" and change the switch statement immediately below.
https://github.com/Kragrathea/OctoPrint-PrettyGCode/blob/master/octoprint_prettygcode/static/js/camera-controls.js#L289

Durahl commented 2 years ago

Fair enough, but where do I find the PrettyGCode folder / camera-controls.js file? 😅

I tried looking for it via an FTP Program but I'm having a hard time finding either of them 🤔

Kragrathea commented 2 years ago

@Durahl Depending on your version it should something like:

~/OctoPrint/venv/lib/python3.7/site-packages/octoprint_prettygcode/static/js or ~/oprint/lib/python2.7/site-packages/octoprint_prettygcode/static/js

On Windows I use WinSCP to browse and edit files on the PI.

Durahl commented 2 years ago

The 2nd path it was!

I'm using FIleZilla, I assume either works 😉 Though I cannot test it with a 10h print running in the background and with that I'm not taking any risks 🤔

Have my preliminary thanks for the assist! 😃