Skip to content

Commit

Permalink
Fix method params
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf committed Nov 8, 2023
1 parent 635d51a commit cfa653d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shieldlib/src/shield_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class AbstractShieldRenderer {
this._renderContext.shieldDef = shieldSpec.networks;
this._fontSpec = "1em " + shieldSpec.options.shieldFont;
if (this._map) {
this.reloadShieldsOnFontLoad(this._fontSpec, this._map);
this.reloadShieldsOnFontLoad();
}
this._shieldDefCallbacks.forEach((callback) =>
callback(shieldSpec.networks)
Expand Down Expand Up @@ -169,14 +169,14 @@ export class AbstractShieldRenderer {
public renderOnMaplibreGL(map: MapLibre): AbstractShieldRenderer {
this._map = map;
if (this._fontSpec) {
this.reloadShieldsOnFontLoad(this._fontSpec, this._map);
this.reloadShieldsOnFontLoad();
}
this.renderOnRepository(new MaplibreGLSpriteRepository(map));
map.on("styleimagemissing", this.getStyleImageMissingHandler());
return this;
}

private reloadShieldsOnFontLoad(fontSpec: string, map: MapLibre): void {
private reloadShieldsOnFontLoad(): void {
if (!this._fontsLoaded && !document.fonts.check(this._fontSpec)) {
document.fonts.load(this._fontSpec).then(() => this.onFontsLoaded());
} else {
Expand Down

0 comments on commit cfa653d

Please sign in to comment.