Skip to content

Commit 0f5ba1c

Browse files
stepankuzminmourner
authored andcommitted
Improve Flow typings (internal-1427)
1 parent 1229b73 commit 0f5ba1c

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/style-spec/types.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export type LineLayerSpecification = {|
329329
"filter"?: FilterSpecification,
330330
"layout"?: {|
331331
"line-cap"?: DataDrivenPropertyValueSpecification<"butt" | "round" | "square">,
332-
"line-join"?: DataDrivenPropertyValueSpecification<"bevel" | "round" | "miter">,
332+
"line-join"?: DataDrivenPropertyValueSpecification<"bevel" | "round" | "miter" | "none">,
333333
"line-miter-limit"?: PropertyValueSpecification<number>,
334334
"line-round-limit"?: PropertyValueSpecification<number>,
335335
"line-sort-key"?: DataDrivenPropertyValueSpecification<number>,
@@ -633,7 +633,8 @@ export type ModelLayerSpecification = {|
633633
"model-emissive-strength"?: DataDrivenPropertyValueSpecification<number>,
634634
"model-roughness"?: DataDrivenPropertyValueSpecification<number>,
635635
"model-height-based-emissive-strength-multiplier"?: DataDrivenPropertyValueSpecification<[number, number, number, number, number]>,
636-
"model-cutoff-fade-range"?: ExpressionSpecification
636+
"model-cutoff-fade-range"?: ExpressionSpecification,
637+
"model-front-cutoff"?: PropertyValueSpecification<[number, number, number]>
637638
|}
638639
|}
639640

src/style/style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2559,7 +2559,7 @@ class Style extends Evented {
25592559
return (this._flattenAndSortRenderedFeatures(sourceResults): any);
25602560
}
25612561

2562-
querySourceFeatures(sourceID: string, params: ?{sourceLayer: ?string, filter: ?Array<any>, validate?: boolean}): Array<QueryFeature> {
2562+
querySourceFeatures(sourceID: string, params: ?{sourceLayer: ?string, filter?: ?Array<any>, validate?: boolean}): Array<QueryFeature> {
25632563
if (params && params.filter) {
25642564
this._validate(validateFilter, 'querySourceFeatures.filter', params.filter, null, params);
25652565
}

src/ui/map.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export type MapOptions = {
146146
maxPitch?: ?number,
147147
boxZoom?: boolean,
148148
dragRotate?: boolean,
149-
dragPan?: DragPanOptions,
149+
dragPan?: boolean | DragPanOptions,
150150
keyboard?: boolean,
151151
doubleClickZoom?: boolean,
152152
touchZoomRotate?: boolean,
@@ -172,7 +172,11 @@ export type MapOptions = {
172172
respectPrefersReducedMotion?: boolean,
173173
contextCreateOptions?: ContextOptions,
174174
devtools?: boolean,
175-
repaint?: boolean
175+
repaint?: boolean,
176+
fadeDuration?: number,
177+
localFontFamily?: string,
178+
localIdeographFontFamily?: string,
179+
performanceMetricsCollection?: boolean,
176180
};
177181

178182
const defaultMinZoom = -2;
@@ -1957,7 +1961,7 @@ export class Map extends Camera {
19571961
*
19581962
* @see [Example: Highlight features containing similar data](https://www.mapbox.com/mapbox-gl-js/example/query-similar-features/)
19591963
*/
1960-
querySourceFeatures(sourceId: string, parameters: ?{sourceLayer: ?string, filter: ?Array<any>, validate?: boolean}): Array<QueryFeature> {
1964+
querySourceFeatures(sourceId: string, parameters: ?{sourceLayer: ?string, filter?: ?Array<any>, validate?: boolean}): Array<QueryFeature> {
19611965
if (!this._isValidId(sourceId)) {
19621966
return [];
19631967
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy