From 375fd64a08e657a77dd89975221b04b7d518c475 Mon Sep 17 00:00:00 2001 From: kukiel Date: Tue, 10 Jul 2018 18:51:34 +0200 Subject: [PATCH] Mapbox popup className option (#27068) * added mapbox-gl popup className option * added mapbox-gl popup className option test --- types/mapbox-gl/index.d.ts | 2 ++ types/mapbox-gl/mapbox-gl-tests.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 4cfdf986bf..5f64b7470b 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -464,6 +464,8 @@ declare namespace mapboxgl { anchor?: Anchor; offset?: number | PointLike | { [key: string]: PointLike; }; + + className?: string; } export interface Style { diff --git a/types/mapbox-gl/mapbox-gl-tests.ts b/types/mapbox-gl/mapbox-gl-tests.ts index fa62007088..87297effda 100644 --- a/types/mapbox-gl/mapbox-gl-tests.ts +++ b/types/mapbox-gl/mapbox-gl-tests.ts @@ -225,7 +225,7 @@ map.addLayer({ /** * Popup */ -var popup = new mapboxgl.Popup({closeOnClick: false, closeButton: true, anchor: 'top-right', offset: {'top': [0,0], 'bottom': [25,-50]} }) +var popup = new mapboxgl.Popup({closeOnClick: false, closeButton: true, anchor: 'top-right', offset: {'top': [0,0], 'bottom': [25,-50]}, className: 'custom-class' }) .setLngLat([-50, 50]) .setHTML('

Hello World!

') .addTo(map);