Cleanup map properties

This commit is contained in:
James Lyne 2021-05-20 15:12:23 +01:00
parent f2bfbf732a
commit acd3e8a443
2 changed files with 6 additions and 10 deletions

View File

@ -84,7 +84,6 @@ function buildWorlds(response: any): Array<DynmapWorld> {
background: map.background || '#000000', background: map.background || '#000000',
backgroundDay: map.backgroundday || '#000000', backgroundDay: map.backgroundday || '#000000',
backgroundNight: map.backgroundnight || '#000000', backgroundNight: map.backgroundnight || '#000000',
compassView: map.compassview || 'S',
icon: map.icon || undefined, icon: map.icon || undefined,
imageFormat: map['image-format'] || 'png', imageFormat: map['image-format'] || 'png',
name: map.name || '(Unnamed map)', name: map.name || '(Unnamed map)',
@ -92,7 +91,6 @@ function buildWorlds(response: any): Array<DynmapWorld> {
prefix: map.prefix || '', prefix: map.prefix || '',
protected: map.protected || false, protected: map.protected || false,
title: map.title || '', title: map.title || '',
type: map.type || 'HDMapType',
mapToWorld: map.maptoworld || [0, 0, 0, 0, 0, 0, 0, 0, 0], mapToWorld: map.maptoworld || [0, 0, 0, 0, 0, 0, 0, 0, 0],
worldToMap: map.worldtomap || [0, 0, 0, 0, 0, 0, 0, 0, 0], worldToMap: map.worldtomap || [0, 0, 0, 0, 0, 0, 0, 0, 0],
nativeZoomLevels: map.mapzoomout || 1, nativeZoomLevels: map.mapzoomout || 1,

14
src/dynmap.d.ts vendored
View File

@ -119,18 +119,16 @@ interface DynmapWorld {
interface DynmapWorldMap { interface DynmapWorldMap {
world: DynmapWorld; world: DynmapWorld;
background: string;
backgroundDay: string;
backgroundNight: string;
compassView: string;
icon: string;
imageFormat: string;
name: string; name: string;
icon: string;
title: string;
background: string;
nightAndDay: boolean; nightAndDay: boolean;
backgroundDay?: string;
backgroundNight?: string;
imageFormat: string;
prefix: string; prefix: string;
protected: boolean; protected: boolean;
title: string;
type: string;
mapToWorld: [number, number, number, number, number, number, number, number, number]; mapToWorld: [number, number, number, number, number, number, number, number, number];
worldToMap: [number, number, number, number, number, number, number, number, number]; worldToMap: [number, number, number, number, number, number, number, number, number];
nativeZoomLevels: number; nativeZoomLevels: number;