Fix build errors

This commit is contained in:
James Lyne 2021-07-29 03:39:28 +01:00
parent 90ec2080ee
commit 02c705de36
8 changed files with 9 additions and 11 deletions

View File

@ -68,12 +68,12 @@ export default defineComponent({
this.leaflet.getLayerManager().addLayer( this.leaflet.getLayerManager().addLayer(
this.layerGroup, this.layerGroup,
true, true,
store.state.components.playerMarkers.layerName, store.state.components.playerMarkers!.layerName,
this.componentSettings!.layerPriority); this.componentSettings!.layerPriority);
} else { } else {
this.leaflet.getLayerManager().addHiddenLayer( this.leaflet.getLayerManager().addHiddenLayer(
this.layerGroup, this.layerGroup,
store.state.components.playerMarkers.layerName, store.state.components.playerMarkers!.layerName,
this.componentSettings!.layerPriority); this.componentSettings!.layerPriority);
} }
}, },

View File

@ -51,8 +51,8 @@ export default defineComponent({
const store = useStore(), const store = useStore(),
messageHeading = computed(() => { messageHeading = computed(() => {
return store.state.messages.playersHeading return store.state.messages.playersHeading
.replace('{cur}', players.value.length) .replace('{cur}', players.value.length.toString())
.replace('{max}', maxPlayers.value); .replace('{max}', maxPlayers.value.toString());
}), }),
messageSkeletonPlayers = computed(() => store.state.messages.playersSkeleton), messageSkeletonPlayers = computed(() => store.state.messages.playersSkeleton),
messageSkeletonPlayersSearch = computed(() => store.state.messages.playersSearchSkeleton), messageSkeletonPlayersSearch = computed(() => store.state.messages.playersSearchSkeleton),

1
src/index.d.ts vendored
View File

@ -244,7 +244,6 @@ interface LiveAtlasServerConfig {
followMap?: string; followMap?: string;
followZoom?: number; followZoom?: number;
title: string; title: string;
grayHiddenPlayers: boolean;
expandUI: boolean; expandUI: boolean;
} }

View File

@ -99,7 +99,6 @@ export const state: State = {
followMap: '', followMap: '',
followZoom: 0, followZoom: 0,
title: '', title: '',
grayHiddenPlayers: false,
expandUI: false, expandUI: false,
}, },
configurationHash: undefined, configurationHash: undefined,

View File

@ -33,7 +33,7 @@ export const createArea = (options: LiveAtlasArea, converter: Function): LiveAtl
} }
if (options.tooltipContent) { if (options.tooltipContent) {
area.bindTooltip(() => options.tooltipContent, tooltipOptions); area.bindTooltip(() => options.tooltipContent as string, tooltipOptions);
} }
return area; return area;

View File

@ -33,7 +33,7 @@ export const createCircle = (options: LiveAtlasCircle, converter: Function): Liv
} }
if (options.tooltipContent) { if (options.tooltipContent) {
circle.bindTooltip(() => options.tooltipContent, tooltipOptions); circle.bindTooltip(() => options.tooltipContent as string, tooltipOptions);
} }
return circle; return circle;

View File

@ -31,7 +31,7 @@ export const createLine = (options: LiveAtlasLine, converter: Function): LiveAtl
} }
if (options.tooltipContent) { if (options.tooltipContent) {
line.bindTooltip(() => options.tooltipContent, tooltipOptions); line.bindTooltip(() => options.tooltipContent as string, tooltipOptions);
} }
return line; return line;

View File

@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
import {LatLngExpression, PathOptions} from "leaflet"; import {Direction, LatLngExpression, PathOptions} from "leaflet";
import {LiveAtlasPath} from "@/index"; import {LiveAtlasPath} from "@/index";
export const tooltipOptions = { export const tooltipOptions = {
direction: 'top', direction: 'top' as Direction,
sticky: true, sticky: true,
opacity: 1.0, opacity: 1.0,
interactive: false, interactive: false,