Skip to content

Commit

Permalink
Don't show set as image button for Google and Bing.
Browse files Browse the repository at this point in the history
Bing gives an odd error, but Google won't work.
  • Loading branch information
murrant committed May 12, 2024
1 parent 60c269b commit cf27679
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/views/map/custom-background-modal.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class="tw-cursor-pointer tw-h-24 tw-w-48"
<x-input id="bg-lng" label="{{ __('map.custom.edit.bg.lng') }}" x-model="lng"></x-input>
<x-input id="bg-zoom" label="{{ __('map.custom.edit.bg.zoom') }}" x-model="zoom"></x-input>
<button type="button" class="btn btn-primary tw-mt-2" @click="adjustMap">{{ __('map.custom.edit.bg.adjust_map') }}</button>
<button type="button" class="btn btn-primary tw-mt-2" @click="setMapAsImage" title="{{ __('map.custom.edit.bg.as_image_hint') }}" :disabled="saving_map_as_image">
<button type="button" class="btn btn-primary tw-mt-2" @click="setMapAsImage" title="{{ __('map.custom.edit.bg.as_image_hint') }}" :disabled="saving_map_as_image" x-show="show_image_export">
<i class="fa-solid fa-circle-notch fa-spin" x-show="saving_map_as_image"></i>
{{ __('map.custom.edit.bg.as_image') }}
</button>
Expand Down Expand Up @@ -61,6 +61,7 @@ function backgroundModalData() {
zoom: null,
layer: null,
image: null,
show_image_export: true,
image_content: null,
saving_map_as_image: false,
error: '',
Expand All @@ -73,6 +74,7 @@ function backgroundModalData() {
this.layer = 'layer' in this.initial_data ? this.initial_data.layer : null;
this.image = this.initial_data['original_filename'];
this.image_content = null;
this.show_image_export = (! 'engine' in this.initial_data) || ! ['google', 'bing'].includes(this.initial_data['engine']);
this.error = '';
setCustomMapBackground('custom-map', this.type, this.initial_data);
Expand Down

0 comments on commit cf27679

Please sign in to comment.