Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Swiping and zooming

Post Reply
Hitman
Posts: 73
Joined: Sat May 20, 2017 11:08 am

Swiping and zooming

Post 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 :cry: any ideas what am i doing wrong?
The same user interface does not crash if i use regular Chrome.

Many thanks in advance!
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Swiping and zooming

Post by salvadordf »

Hi,

I don't have a windows tablet or a touchscreen monitor and I can't test those features. :oops:

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.
Hitman
Posts: 73
Joined: Sat May 20, 2017 11:08 am

Re: Swiping and zooming

Post 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!
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Swiping and zooming

Post 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');
Hitman
Posts: 73
Joined: Sat May 20, 2017 11:08 am

Re: Swiping and zooming

Post 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');
Post Reply