Conditional default prevention instead of touch-action: none
This commit is contained in:
12
examples/two-finger-pan-scroll.html
Normal file
12
examples/two-finger-pan-scroll.html
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
layout: example.html
|
||||
title: Panning and page scrolling
|
||||
shortdesc: Shows a map that allows page scrolling unless two fingers or Cmd/Ctrl are used to pan the map.
|
||||
docs: >
|
||||
This example shows a common behavior for page scrolling: on touch devices, when one finger
|
||||
is placed on the map, it can be used to scroll the page. Only two fingers will perform drag pan.
|
||||
For mouse or trackpad devices, the platform modifier key (Cmd or Ctrl) will enable drag pan on
|
||||
the map, otherwise the page will scroll.
|
||||
tags: "trackpad, mousewheel, zoom, scroll, page"
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
Reference in New Issue
Block a user