Page 1 of 1
Swiping and zooming
Posted: Mon Jul 09, 2018 7:58 pm
by Hitman
Hi guys,
i have got a touch screen user interface that is made of HTML5.
User interface has some images that are swiped and zoomed.
However,
when i try to swipe or zoom the images, my browser is crashing

any ideas what am i doing wrong?
The same user interface does not crash if i use regular Chrome.
Many thanks in advance!
Re: Swiping and zooming
Posted: Tue Jul 10, 2018 8:25 am
by salvadordf
Hi,
I don't have a windows tablet or a touchscreen monitor and I can't test those features.
All I can suggest is that you try the command switches related to touch support or pinch gestures from this web page :
https://peter.sh/experiments/chromium-c ... -switches/
Search for the words "touch" or "pinch" in that page and you will find many switches that might help you.
Other possible causes of that crash :
- The hardware acceleration is enabled but that device is not fully supported.
- Trying to close the browser window without following the destruction sequence.
- Using the "single process" mode.
Re: Swiping and zooming
Posted: Wed Jul 11, 2018 7:44 am
by Hitman
Hi Salvador,
thank you!
I however do not understand anything from the content of the link.
The simple question will be,
how do i disable zooming of browser window?
Many thanks in advance!
Re: Swiping and zooming
Posted: Wed Jul 11, 2018 8:17 am
by salvadordf
The command switches in that link are used by Chromium or Chrome and many of them are supported by CEF3 too.
You can use them in CEF4Delphi by adding
GlobalCEFApp.AddCustomCommandLine before the GlobalCEFApp.StartMainProcess call in the DPR file.
For example, if you want to disable compositor-accelerated touch-screen pinch gestures (zoom with 2 fingers) you would have to use
--disable-pinch like this :
Code: Select all
GlobalCEFApp.AddCustomCommandLine('--disable-pinch');
If you want to disable touch event based drag and drop then you would have to use
--disable-touch-drag-drop like this :
Code: Select all
GlobalCEFApp.AddCustomCommandLine('--disable-touch-drag-drop');
Re: Swiping and zooming
Posted: Wed Jul 11, 2018 11:11 am
by Hitman
Salvador,
i do not know how to say this, you are simply great!!!
Many thanks!
I do very much appreciate this.
I was able to disable the pinch zoom and make it work as expected by adding the following lines,
Code: Select all
{ the following 3 lines are for disabling the zooming options.}
GlobalCEFApp.AddCustomCommandLine('--disable-pinch');
GlobalCEFApp.AddCustomCommandLine('--disable-touch-drag-drop');
GlobalCEFApp.AddCustomCommandLine('--compensate-for-unstable-pinch-zoom');