Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2024.02.xx] #10711: Control loading FontAwesome for vector style (#10715) #10730

Merged
Merged
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
6 changes: 5 additions & 1 deletion web/client/utils/styleparser/StyleParserUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import isNil from 'lodash/isNil';
import isObject from 'lodash/isObject';
import MarkerUtils from '../MarkerUtils';
import {randomInt} from '../RandomUtils';
import { getConfigProp } from '../ConfigUtils';


export const isGeoStylerBooleanFunction = (got) => [
Expand Down Expand Up @@ -917,7 +918,10 @@ export const drawIcons = (geoStylerStyle, options) => {
}, []);
const marks = symbolizers.filter(({ kind }) => kind === 'Mark');
const icons = symbolizers.filter(({ kind }) => kind === 'Icon');
return loadFontAwesome()
const loadFontAwesomeForIcons = getConfigProp("loadFontAwesomeForIcons");
// if undefined or true it will load it to preserve previous behaviour
const loadingPromise = (isNil(loadFontAwesomeForIcons) || loadFontAwesomeForIcons) && icons?.length ? loadFontAwesome() : Promise.resolve();
return loadingPromise
.then(
() => new Promise((resolve) => {
if (marks.length > 0 || icons.length > 0) {
Expand Down
Loading