OctoPrint-PrettyGCode icon indicating copy to clipboard operation
OctoPrint-PrettyGCode copied to clipboard

Feature Request: Swap Mouse Buttons Toggle?

Open Durahl opened this issue 4 years ago • 4 comments

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! 🙂

Durahl avatar Oct 18 '21 23:10 Durahl

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

Kragrathea avatar Oct 19 '21 02:10 Kragrathea

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 🤔

Durahl avatar Oct 19 '21 12:10 Durahl

@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.

Kragrathea avatar Oct 19 '21 19:10 Kragrathea

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! 😃

Durahl avatar Oct 19 '21 23:10 Durahl