Skip to content

Commit

Permalink
feat: updated demo website (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
JinIgarashi authored Mar 10, 2024
1 parent 41ef0f8 commit 7d86d84
Show file tree
Hide file tree
Showing 58 changed files with 1,730 additions and 444 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["maplibre-gl-export.water-gis.com"]
"ignore": ["demo"]
}
7 changes: 7 additions & 0 deletions .changeset/tasty-horses-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@watergis/maplibre-gl-export": patch
"@watergis/mapbox-gl-export": patch
---

- feat: add languageName prop in Translation interface
- fix: remove PrintableArea when the control is removed from map instance.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ jobs:

- run: pnpm lint

- run: pnpm build
- name: build
env:
PUBLIC_MAPBOX_ACCESSTOKEN: ${{ secrets.PUBLIC_MAPBOX_ACCESSTOKEN }}
run:
pnpm build
5 changes: 5 additions & 0 deletions packages/mapbox-gl-export/src/lib/export-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ export default class MapboxExportControl implements IControl {
this.crosshair = undefined;
}

if (this.printableArea !== undefined) {
this.printableArea.destroy();
this.printableArea = undefined;
}

this.map = undefined;
}

Expand Down
5 changes: 5 additions & 0 deletions packages/maplibre-gl-export/src/lib/export-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ export default class MaplibreExportControl implements IControl {
this.crosshair = undefined;
}

if (this.printableArea !== undefined) {
this.printableArea.destroy();
this.printableArea = undefined;
}

this.map = undefined;
}

Expand Down
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'Papierausrichtung',
Format: 'Dateiformat',
DPI: 'Druckauflösung',
Generate: 'Erstellen'
Generate: 'Erstellen',
LanguageName: 'German'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'Page Orientation',
Format: 'Format',
DPI: 'DPI',
Generate: 'Generate'
Generate: 'Generate',
LanguageName: 'English'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'Orientación de página',
Format: 'Formato',
DPI: 'DPI',
Generate: 'Generar'
Generate: 'Generar',
LanguageName: 'Spanish'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/fi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'Sivun suunta',
Format: 'Muoto',
DPI: 'DPI',
Generate: 'Generoi'
Generate: 'Generoi',
LanguageName: 'Finish'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'Orientation de la page',
Format: 'Format',
DPI: 'DPI',
Generate: 'Générer'
Generate: 'Générer',
LanguageName: 'French'
};

export default translation;
1 change: 1 addition & 0 deletions packages/maplibre-gl-export/src/lib/local/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Translation = {
Format: string;
DPI: string;
Generate: string;
LanguageName: string;
};

type languages = 'de' | 'en' | 'fr' | 'fi' | 'sv' | 'es' | 'vi' | 'uk' | 'zhHans' | 'zhHant' | 'ja';
Expand Down
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'ページ方向',
Format: 'フォーマット',
DPI: 'DPI(解像度)',
Generate: '出力'
Generate: '出力',
LanguageName: 'Japanese'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/sv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'Sidorientering',
Format: 'Format',
DPI: 'DPI',
Generate: 'Generera'
Generate: 'Generera',
LanguageName: 'Swedish'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'Орієнтація сторінки',
Format: 'Формат',
DPI: 'DPI',
Generate: 'Згенерувати'
Generate: 'Згенерувати',
LanguageName: 'Ukranian'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/vi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: 'Loại trang',
Format: 'Định dạng',
DPI: 'Mật độ điểm ảnh (DPI)',
Generate: 'Tạo'
Generate: 'Tạo',
LanguageName: 'Vietnam'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/zhHans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: '页面方向',
Format: '格式',
DPI: '像素',
Generate: '导出'
Generate: '导出',
LanguageName: 'Chinese simplified'
};

export default translation;
3 changes: 2 additions & 1 deletion packages/maplibre-gl-export/src/lib/local/zhHant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const translation = {
PageOrientation: '頁面方向',
Format: '格式',
DPI: '像素',
Generate: '導出'
Generate: '導出',
LanguageName: 'Chinese traditional'
};

export default translation;
Loading

0 comments on commit 7d86d84

Please sign in to comment.