Open mattia-donato opened 6 years ago
Hey @mattiad, the problem at the moment is the plugin isn't listening to touch-screen events, only trackpad events. Unfortunately I haven't got access to a touch screen device to test on but I'm expecting it to be simple enough to get it working once it's picking up touch screen events.
There's some potential issues with the browser default actions overriding the plugin but worst case is that the user has to manually disable these
I've been putting development aside to focus on my day job but now the user numbers have increased I'm going to try and resolve some of these bugs.
I'm going to guess at an implementation, could you test it for me when it's ready?
What happens when you pinch to interact with the photos on these pages: https://patrickhlauke.github.io/touch/picture-organiser/ http://scripty2.com/demos/touch/photofun/
Does it work as expected or does it trigger the ctrl +
behaviour?
I'm going to guess at an implementation, could you test it for me when it's ready?
Of course!
In picture-organizer, i can move 4 cards with 4 fingers... so it works as expected. :+1:
Instead in photofun looks like if I trigger the firefox standard zoom (ctrl + or -
) :-1:
Thanks @mattiad, that's helpful to know, looks like event.preventDefault()
is doing the trick to override the standard zoom behaviour
I have opened a pull request, the modified script now listens for touch events. #15
Hi QWERTYUIOPYOZO and thank you! It works but it has some bugs... The pinch-zoom sometimes works fine, but sometimes the it is like if the pinch-zoom go in reverse directions, that is when pinch-in it is zooming out and sometimes the page results blurry (and not vectorial!).
Before everything I would thank you for this nice add-on for Firefox. Here I would just try to tell my experience with it. I am using Firefox 58.0.1 on a Linux 64-bit (debian stretch). The machine is a Lenovo Yoga 510-14IKB with a touchscreen which works correctly in Linux. For example, it works correctly in Chrome or Opera. In order to activate the touchscreen support on Firefox, I need to set a special environment variable. So I run firefox as:
MOZ_USE_XINPUT2=1 firefox
In this way, firefox recognize the touchscreen and I can use the two-finger on the touchscreen to scroll the pages. And it works correctly. Without using firefox-multi-touch-zoom add-on, the pinch-zoom works really bad! Practically it is equivalent to use Ctrl + mouse-scroll,Ctrl +
orCtrl -
. That's way I looked for firefox-multi-touch-zoom. When I use firefox-multi-touch-zoom , the Ctrl or Shift together with the mouse scroll/wheel the smooth zoom works perfectly. That's great! :+1: :+1: :+1: But it works only with the mouse/Touchpad. But if I try to pinch-zoom with two fingers on the touchscreen the behaviour of firefox is exactly asCtrl +
orCtrl -
, so the old ugly non-smooth zoom. :-1:Any idea how to solve it?
I've noticed in
about:config
that the default configuration is set asbrowser.gesture.pinch.in = cmd_fullZoomReduce
browser.gesture.pinch.in.shift = cmd_fullZoomReset
browser.gesture.pinch.out = cmd_fullZoomEnlarge
browser.gesture.pinch.out.shift = cmd_fullZoomReset
the cmd name can be changed. (I tried to change name and of course the two finger zoom was not working at all.) I wonder if it is possible to get or override the functions (for example cmd_fullZoomReduce) in order to allow to use your nice smooth-zoom applyScale function when it is given browser.gesture.pinch event.