Skip to content

Commit

Permalink
bump maplibre-style-spec version
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislawpuda-tomtom committed Jan 21, 2025
1 parent 00a0acf commit e9f5cef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@mapbox/unitbezier": "^0.0.1",
"@mapbox/vector-tile": "^1.3.1",
"@mapbox/whoots-js": "^3.1.0",
"@maplibre/maplibre-gl-style-spec": "^23.0.0",
"@maplibre/maplibre-gl-style-spec": "^23.1.0",
"@types/geojson": "^7946.0.15",
"@types/geojson-vt": "3.2.5",
"@types/mapbox__point-geometry": "^0.1.4",
Expand Down
12 changes: 6 additions & 6 deletions src/symbol/shaping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,27 @@ class SectionOptions {
// Image options
imageName: string | null;
// Common options
verticalAlign: 'baseline' | 'top' | 'center';
verticalAlign: 'bottom' | 'top' | 'center';

constructor() {
this.scale = 1.0;
this.fontStack = '';
this.imageName = null;
this.verticalAlign = 'baseline';
this.verticalAlign = 'bottom';
}

static forText(scale: number | null, fontStack: string, verticalAlign: 'baseline' | 'top' | 'center' | null) {
static forText(scale: number | null, fontStack: string, verticalAlign: 'bottom' | 'top' | 'center' | null) {
const textOptions = new SectionOptions();
textOptions.scale = scale || 1;
textOptions.fontStack = fontStack;
textOptions.verticalAlign = verticalAlign || 'baseline';
textOptions.verticalAlign = verticalAlign || 'bottom';
return textOptions;
}

static forImage(imageName: string, verticalAlign: 'baseline' | 'top' | 'center' | null) {
static forImage(imageName: string, verticalAlign: 'bottom' | 'top' | 'center' | null) {
const imageOptions = new SectionOptions();
imageOptions.imageName = imageName;
imageOptions.verticalAlign = verticalAlign || 'baseline';
imageOptions.verticalAlign = verticalAlign || 'bottom';
return imageOptions;
}

Expand Down

0 comments on commit e9f5cef

Please sign in to comment.