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.layerGroup,
true,
store.state.components.playerMarkers.layerName,
store.state.components.playerMarkers!.layerName,
this.componentSettings!.layerPriority);
} else {
this.leaflet.getLayerManager().addHiddenLayer(
this.layerGroup,
store.state.components.playerMarkers.layerName,
store.state.components.playerMarkers!.layerName,
this.componentSettings!.layerPriority);
}
},

View File

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

1
src/index.d.ts vendored
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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