mapbox-gl-controls
Advanced tools
Comparing version 2.3.3 to 2.3.4
@@ -16,3 +16,3 @@ import { LngLat, MapboxGeoJSONFeature, MapMouseEvent } from 'mapbox-gl'; | ||
mapCanvas: HTMLCanvasElement; | ||
constructor(options: InspectControlOptions); | ||
constructor(options?: InspectControlOptions); | ||
insert(): void; | ||
@@ -19,0 +19,0 @@ inspectingOn(): void; |
@@ -8,3 +8,3 @@ import Base from '../Base/Base'; | ||
super(); | ||
this.console = options.console; | ||
this.console = options === null || options === void 0 ? void 0 : options.console; | ||
this.popupNode = null; | ||
@@ -11,0 +11,0 @@ this.lngLat = null; |
@@ -9,2 +9,3 @@ import iconLeft from '../icons/left'; | ||
function getData(feature) { | ||
var _a; | ||
const layerData = [ | ||
@@ -15,3 +16,3 @@ 'layer', | ||
{ key: 'source', value: feature.layer.source }, | ||
{ key: 'source-layer', value: feature.layer['source-layer'] }, | ||
{ key: 'source-layer', value: (_a = feature.layer['source-layer']) !== null && _a !== void 0 ? _a : '—' }, | ||
]; | ||
@@ -18,0 +19,0 @@ const featureData = ['properties']; |
{ | ||
"name": "mapbox-gl-controls", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Controls for mapbox-gl", |
@@ -21,5 +21,5 @@ import { LngLat, MapboxGeoJSONFeature, MapMouseEvent, PointLike } from 'mapbox-gl'; | ||
constructor(options: InspectControlOptions) { | ||
constructor(options?: InspectControlOptions) { | ||
super(); | ||
this.console = options.console; | ||
this.console = options?.console; | ||
this.popupNode = null; | ||
@@ -26,0 +26,0 @@ this.lngLat = null; |
@@ -17,3 +17,3 @@ import { MapboxGeoJSONFeature } from 'mapbox-gl'; | ||
{ key: 'source', value: feature.layer.source }, | ||
{ key: 'source-layer', value: feature.layer['source-layer'] }, | ||
{ key: 'source-layer', value: feature.layer['source-layer'] ?? '—' }, | ||
]; | ||
@@ -20,0 +20,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
171641
3091