Skip to content

Commit

Permalink
geosolutions-it#10711: enhance drawIcons if there are icons in data a…
Browse files Browse the repository at this point in the history
…nd loadFontAwesomeForIcons = true --> it will load fontAwesome and if there is no icons ---> it won't load
  • Loading branch information
mahmoudadel54 committed Dec 4, 2024
1 parent cffacb9 commit 51cd13c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/client/utils/styleparser/StyleParserUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ export const drawIcons = (geoStylerStyle, options) => {
}, []);
const marks = symbolizers.filter(({ kind }) => kind === 'Mark');
const icons = symbolizers.filter(({ kind }) => kind === 'Icon');
const shouldLoadFontAwesomeForIcons = geoStylerStyle.loadFontAwesomeForIcons ? loadFontAwesome() : Promise.resolve();
const shouldLoadFontAwesomeForIcons = (geoStylerStyle.loadFontAwesomeForIcons && icons.length > 0) ? loadFontAwesome() : Promise.resolve();
return shouldLoadFontAwesomeForIcons
.then(
() => new Promise((resolve) => {
Expand Down

0 comments on commit 51cd13c

Please sign in to comment.