Add support for gestureHandling for Google Maps (#16287)

Add support for the gestureHandling property on the MapOptions
interface.
This commit is contained in:
Martin Costello
2017-05-03 19:36:44 +01:00
committed by Mohamed Hegazy
parent da8970e975
commit ce6ecda5cd
2 changed files with 12 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ let map = new google.maps.Map(
fullscreenControlOptions: {
position: google.maps.ControlPosition.RIGHT_TOP
},
gestureHandling: "cooperative",
scrollwheel: true,
zoom: 4
});

View File

@@ -1,6 +1,6 @@
// Type definitions for Google Maps JavaScript API 3.26
// Project: https://developers.google.com/maps/
// Definitions by: Folia A/S <http://www.folia.dk>, Chris Wrench <https://github.com/cgwrench>, Kiarash Ghiaseddin <https://github.com/Silver-Connection/DefinitelyTyped>, Grant Hutchins <https://github.com/nertzy>, Denis Atyasov <https://github.com/xaolas>, Michael McMullin <https://github.com/mrmcnerd>
// Definitions by: Folia A/S <http://www.folia.dk>, Chris Wrench <https://github.com/cgwrench>, Kiarash Ghiaseddin <https://github.com/Silver-Connection/DefinitelyTyped>, Grant Hutchins <https://github.com/nertzy>, Denis Atyasov <https://github.com/xaolas>, Michael McMullin <https://github.com/mrmcnerd>, Martin Costello <https://github.com/martincostello>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/*
@@ -95,6 +95,10 @@ declare namespace google.maps {
fullscreenControl?: boolean;
/** The display options for the Fullscreen control. */
fullscreenControlOptions?: FullscreenControlOptions;
/**
* This setting controls how gestures on the map are handled.
*/
gestureHandling?: GestureHandlingOptions;
/**
* The heading for aerial imagery in degrees measured clockwise from cardinal
* direction North. Headings are snapped to the nearest available angle for
@@ -250,6 +254,12 @@ declare namespace google.maps {
opened?: boolean;
}
export type GestureHandlingOptions =
"cooperative" |
"greedy" |
"none" |
"auto";
/** Options for the rendering of the pan control. */
export interface PanControlOptions {
/**