Page MenuHomePhabricator

Allow to enable/disable recent improvements in zooming/moving scans with Wikisources
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

In recent days new zooming support for scans was introduced in Wikisources. Please next to zoom in and zoom out icons add third icon to turn on and off this features (with keybord shortcut to turn it on and off)

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

The new feature of zooming in and out scans is a problem for me. I use Wikisources on two computers: one with Windows 10/Chrome and second with Chrome OS/Chrome. On both machines I don't use mouse.

On Windows I use a gesture of moving two fingers on touch pad to scroll the whole html page. But when I scroll sometimes after first scroll cursor pointer lands on scan area and second gesture instead of scrolling whole page, does zooming of scan. It's not what I wanted to do with my gesture. It is very annoying.

On Chrome OS I have touch screen (convertible laptop) and I operate Wikisources in tablet mode only by touching a screen. When I scroll page with my finger I can't scroll whole html page by holding scan area because it moves scan instead of whole html page. Scan is 50% of screen area (right side) and it limits me on scrolling screen. I can hardly reach left side of screen with my right hand just to scroll html page up and down. I need scan area to do it.

I simply don't need zooming in and out and moving scans. I need scrolling whole html page both on windows and chrome os. So please allow to turn the zooming and moving of scans to be turned on/off. And remember this state across the working sessions with Wikisources (for all visited pages).

Benefits (why should this be implemented?):

I don't know whether this zooming and moving scans feature was consulted or not, but such turning it on/off should be implemented because for some users automatic handling of mouse events can be more annoying than helping when someone does not use mouse but only touch pad or touch screen. It slows down my productivity with Wikisources.

Event Timeline

There is some discussion upstream wrt to the exact same problem (issue 1791). Maybe we could implement option 2 (no panning when zoomed out, but panning is enabled when zoomed in when on mobile).

OSD has the ability to set the gestures separately for mouse and touch devices, something we did not have before. @Mahnka can you try the following JS in your common.js and see if that resolves the issue for you?

	mw.hook( 'ext.proofreadpage.osd-viewer-ready' ).add( function ( viewer ) {
		viewer.gestureSettingsTouch.scrollToZoom = false;
		viewer.gestureSettingsTouch.pinchToZoom = false;
	} );

If it does, that will inform on the method we could use to add a toggle to this behaviour.

@Mahnka can you try the following JS in your common.js ....

The code you proposed partially changed behaviour on touch screen on ChromeOS. It no more zooms when pinching with two fingers. But it still zooms with two fingers gestures on touchpad on ChromeOS and Windows 10.

Probably the touchpad is actually "faking" a scroll event, rather than providing a genuine multi-touch event, so it's controlled by gestureSettingsMouse instead. So you might also try:

viewer.gestureSettingsMouse.scrollToZoom = false;