Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/main/src/mapbox-legacy/mapbox/mapbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
diff: styleDiffing
};
if ('localIdeographFontFamily' in nextProps) {
// @ts-ignore Mapbox specific prop
// mapbox-gl v1 ships no bundled types but supports this option at runtime; TS 4.9+ in-narrowing makes this type-safe
options.localIdeographFontFamily = nextProps.localIdeographFontFamily;
}
this._map.setStyle(normalizeStyle(mapStyle), options);
Expand All @@ -515,7 +515,7 @@
@param {object} currProps
@returns {bool} true if anything is changed
*/
_updateStyleComponents(nextProps: MapboxProps, currProps: MapboxProps): boolean {

Check warning on line 518 in modules/main/src/mapbox-legacy/mapbox/mapbox.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^6.0.0)

Method '_updateStyleComponents' has a complexity of 13. Maximum allowed is 11

Check warning on line 518 in modules/main/src/mapbox-legacy/mapbox/mapbox.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^4.0.0)

Method '_updateStyleComponents' has a complexity of 13. Maximum allowed is 11

Check warning on line 518 in modules/main/src/mapbox-legacy/mapbox/mapbox.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^5.0.0)

Method '_updateStyleComponents' has a complexity of 13. Maximum allowed is 11
const map = this._map;
let changed = false;
if (map.isStyleLoaded()) {
Expand Down
2 changes: 1 addition & 1 deletion modules/react-mapbox/src/mapbox/mapbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
diff: styleDiffing
};
if ('localIdeographFontFamily' in nextProps) {
// @ts-ignore Mapbox specific prop
// localIdeographFontFamily is a MapOptions field in mapbox-gl v3; TS 4.9+ in-narrowing makes this type-safe
options.localIdeographFontFamily = nextProps.localIdeographFontFamily;
}
this._map.setStyle(normalizeStyle(mapStyle), options);
Expand All @@ -512,7 +512,7 @@
@param {object} currProps
@returns {bool} true if anything is changed
*/
_updateStyleComponents(nextProps: MapboxProps, currProps: MapboxProps): boolean {

Check warning on line 515 in modules/react-mapbox/src/mapbox/mapbox.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^6.0.0)

Method '_updateStyleComponents' has a complexity of 13. Maximum allowed is 11

Check warning on line 515 in modules/react-mapbox/src/mapbox/mapbox.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^4.0.0)

Method '_updateStyleComponents' has a complexity of 13. Maximum allowed is 11

Check warning on line 515 in modules/react-mapbox/src/mapbox/mapbox.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^5.0.0)

Method '_updateStyleComponents' has a complexity of 13. Maximum allowed is 11
const map = this._map;
let changed = false;
if (map.isStyleLoaded()) {
Expand Down
2 changes: 1 addition & 1 deletion modules/react-maplibre/src/maplibre/maplibre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
if (map.isStyleLoaded()) {
map.fire('load');
} else {
map.once('style.load', () => map.fire('load'));

Check warning on line 286 in modules/react-maplibre/src/maplibre/maplibre.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^4.0.0)

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 286 in modules/react-maplibre/src/maplibre/maplibre.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^5.0.0)

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
}

// Force reload
Expand Down Expand Up @@ -512,7 +512,7 @@
diff: styleDiffing
};
if ('localIdeographFontFamily' in nextProps) {
// @ts-ignore Mapbox specific prop
// localIdeographFontFamily is a MapLibre StyleOptions field; TS 4.9+ in-narrowing makes this type-safe
options.localIdeographFontFamily = nextProps.localIdeographFontFamily;
}
this._map.setStyle(normalizeStyle(mapStyle), options);
Expand All @@ -524,7 +524,7 @@
* 1. They can not be applied right away. Certain conditions (style loaded, source loaded, etc.) must be met
* 2. They can be overwritten by mapStyle
*/
private _updateStyleComponents({light, projection, sky, terrain}: MaplibreProps): void {

Check warning on line 527 in modules/react-maplibre/src/maplibre/maplibre.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^6.0.0)

Method '_updateStyleComponents' has a complexity of 14. Maximum allowed is 11

Check warning on line 527 in modules/react-maplibre/src/maplibre/maplibre.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^4.0.0)

Method '_updateStyleComponents' has a complexity of 14. Maximum allowed is 11

Check warning on line 527 in modules/react-maplibre/src/maplibre/maplibre.ts

View workflow job for this annotation

GitHub Actions / test-node-matrix (^5.0.0)

Method '_updateStyleComponents' has a complexity of 14. Maximum allowed is 11
const map = this._map;
const currProps = this._styleComponents;
// We can safely manipulate map style once it's loaded
Expand Down
Loading