Remove updateInterval from store
This commit is contained in:
parent
33b5b305e2
commit
44b3a7e276
1
src/dynmap.d.ts
vendored
1
src/dynmap.d.ts
vendored
@ -50,7 +50,6 @@ interface DynmapServerConfig {
|
|||||||
defaultZoom: number;
|
defaultZoom: number;
|
||||||
followMap?: string;
|
followMap?: string;
|
||||||
followZoom: number;
|
followZoom: number;
|
||||||
updateInterval: number;
|
|
||||||
showLayerControl: boolean;
|
showLayerControl: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
loginEnabled: boolean;
|
loginEnabled: boolean;
|
||||||
|
@ -60,7 +60,6 @@ export default class DynmapMapProvider extends MapProvider {
|
|||||||
defaultZoom: response.defaultzoom || 0,
|
defaultZoom: response.defaultzoom || 0,
|
||||||
followMap: response.followmap || undefined,
|
followMap: response.followmap || undefined,
|
||||||
followZoom: response.followzoom || 0,
|
followZoom: response.followzoom || 0,
|
||||||
updateInterval: response.updaterate || 3000,
|
|
||||||
showLayerControl: response.showlayercontrol && response.showlayercontrol !== 'false', //Sent as a string for some reason
|
showLayerControl: response.showlayercontrol && response.showlayercontrol !== 'false', //Sent as a string for some reason
|
||||||
title: response.title.replace(titleColoursRegex, '') || 'Dynmap',
|
title: response.title.replace(titleColoursRegex, '') || 'Dynmap',
|
||||||
loginEnabled: response['login-enabled'] || false,
|
loginEnabled: response['login-enabled'] || false,
|
||||||
@ -672,7 +671,7 @@ export default class DynmapMapProvider extends MapProvider {
|
|||||||
const store = useStore(),
|
const store = useStore(),
|
||||||
config = DynmapMapProvider.buildServerConfig(response);
|
config = DynmapMapProvider.buildServerConfig(response);
|
||||||
|
|
||||||
this.updateInterval = config.updateInterval;
|
this.updateInterval = response.updaterate || 3000;
|
||||||
|
|
||||||
store.commit(MutationTypes.SET_SERVER_CONFIGURATION, config);
|
store.commit(MutationTypes.SET_SERVER_CONFIGURATION, config);
|
||||||
store.commit(MutationTypes.SET_SERVER_MESSAGES, DynmapMapProvider.buildMessagesConfig(response));
|
store.commit(MutationTypes.SET_SERVER_MESSAGES, DynmapMapProvider.buildMessagesConfig(response));
|
||||||
|
@ -95,7 +95,6 @@ export const state: State = {
|
|||||||
defaultZoom: 0,
|
defaultZoom: 0,
|
||||||
followMap: '',
|
followMap: '',
|
||||||
followZoom: 0,
|
followZoom: 0,
|
||||||
updateInterval: 3000,
|
|
||||||
showLayerControl: false,
|
showLayerControl: false,
|
||||||
title: '',
|
title: '',
|
||||||
loginEnabled: false,
|
loginEnabled: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user