Skip to content

Commit

Permalink
Turn on mapbox-gl-rtl-text when RTL text is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
budavariam committed Sep 27, 2023
1 parent 8690cd2 commit 6ed0a72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,12 @@ export class MapboxMap implements IVisual {
// @ts-ignore
mapboxgl.accessToken = this.settings.api.accessToken;
}


mapboxgl.setRTLTextPlugin(
'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js',
null,
true // Lazy load the plugin
);

let style = this.settings.api.style == 'custom' ? this.settings.api.styleUrl : this.settings.api.style;
if (this.mapStyle == '' || this.mapStyle != style) {
Expand Down

0 comments on commit 6ed0a72

Please sign in to comment.