Bug 142869 - pan document canvas with click-hold of middle mouse button, as improvement over current Pan & Zoom mode functions
Summary: pan document canvas with click-hold of middle mouse button, as improvement ov...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 142870 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-15 09:17 UTC by dainius.mazuika
Modified: 2021-06-18 09:38 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dainius.mazuika 2021-06-15 09:17:17 UTC
Description:
Another opensource project kicad has a nice feature: It allows user to pan visible page by holding middle or right mouse buttons (configurable). It would be nice to have this feature in libre draw.

Steps to Reproduce:
1. Hold down middle mouse button while pointer is inside working page;
2. Move mouse;


Actual Results:
3. Nothing happens.

Expected Results:
Page should be moved together with mouse in step 3.


Reproducible: Always


User Profile Reset: No



Additional Info:
https://forum.kicad.info/
Comment 1 [REDACTED] 2021-06-15 15:48:32 UTC
*** Bug 142870 has been marked as a duplicate of this bug. ***
Comment 2 V Stuart Foote 2021-06-15 21:44:49 UTC
Already exists for sd (Draw & Impress) as Zoom & Pan mode.

Enter from main menu View --> 'Zoom & Pan'

Then a <Shift> w/l-mouse click will enter Pan mode -- mode and mouse movement applies while <shift> is held.  On release to Zoom mode, where mouse click will zoom-in at mouse pointer position, and <Ctrl>+ l-mouse click will zoom-out.

And of course for all modules, with nothing selected the mouse wheel will scroll canvas up and down; while <shift> + mouse wheel will scroll canvas left and right.
Comment 3 dainius.mazuika 2021-06-16 06:27:28 UTC
Your suggestion (View --> 'Zoom & Pan') or View --> 'Shift' works like a "tool", I mean when you click on View --> subitems mentioned, mouse goes into panning mode. Nothing can be done except for view manipulation, I cannot edit the document, add objects or whatever. If I click on real tool, for instance - add rectangle, LO Draw exits 'Zoom & Pan' mode. I can no longer pan the document using middle mouse button.

What I am asking here - make middle mouse button available to pan document any time, without any additional modifier key pressed in the keyboard or activating some functions inside program menu. Middle mouse button click + drag = grab page sheet and pan it, anytime.
Comment 4 V Stuart Foote 2021-06-16 13:23:39 UTC
OK, middle-mouse / mouse-wheel click hold to grab canvas and pan it would be a nice enhancement. The modal nature of the 'Pan & Zoom' is a bit annoying to work with.

+1
Comment 5 Heiko Tietze 2021-06-17 11:49:58 UTC
While this is common and Inkscape does the same, the middle button is often occupied with some OS function; for example it inserts the clipboard content on my system. Inkscape hijacks the middle button shortcut and makes it work as panning instead of paste. Interesting solution.

The middle button with any modifier such as shift is free.
Comment 6 dainius.mazuika 2021-06-17 12:03:51 UTC
I suggest paning option should be customized via preferences:
1) Enable paning (checkbox);
2) Mouse button for paning: Middle (default) / Right (Radio buttons);
3) Assign modifier keys for paning: None (default) / Alt / Shift / CTRL (radio buttons);

Probably middle mouse button usage depends on drivers, not OS. This button is free for programs to use on default windows installation + cheap mouse. But, touchpad has some customized actions (multifinger gestures, soon in out, rotate, which are drivers-driven)
Comment 7 V Stuart Foote 2021-06-17 13:27:18 UTC
Well as it is we already set options for LO use of the middle mouse button (so affecting true 3-button mouse, or m-scrollwheel, or multi-point touchpad) [1]. 

Look at Tools -> Options -> View in the Mouse section we have the 'Middle button' listbox. It assigns 'no function', 'automatic scrolling', or 'paste clipboard' actions.

We'd just looked at behaviors in bug 142285 for ScrollBar::MouseButtonDown, and there is bug 97336 for how the middlebutton option gets applied on change.

On Windows builds default is 'automatic scrolling'.  While this applies in Writer (though awkwardly as it is the scroll action) it has no effect in Draw or Impress.

Would think the default 'automatic scrolling' setting could be used for sd modules to provide a drag style Pan by default.  Folks wanting the paste clipbord for middlebutton can set that.

In any case an always available drag based Pan of canvas would be a useful enhancement to supplement the current Zoom & Pan stateful mode.

=-ref-=
[1] https://gerrit.libreoffice.org/c/core/+/82473
Comment 8 Heiko Tietze 2021-06-18 09:38:48 UTC
Middle mouse button is often occupied with functionality, paste clipboard for me. But Inkscape managed it somehow to overwrite and pans the canvas instead. Don't see an objection from UX.