Cleanup console logs

This commit is contained in:
James Lyne 2020-12-18 16:12:14 +00:00
parent b92120e801
commit da2c89730e
12 changed files with 10 additions and 35 deletions

View File

@ -40,12 +40,10 @@ export default defineComponent({
mounted() {
this.leaflet.addControl(this.control);
// console.log('Mounted coordinatesControl');
},
unmounted() {
this.leaflet.removeControl(this.control);
// console.log('Unmounted coordinatesControl');
},
render() {

View File

@ -52,7 +52,6 @@ export default defineComponent({
active = computed(() => props.map === store.state.currentMap),
enableLayer = () => {
console.log('Set current projection');
useStore().commit(MutationTypes.SET_CURRENT_PROJECTION, layer.getProjection());
props.leaflet.addLayer(layer);
@ -74,12 +73,10 @@ export default defineComponent({
handlePendingUpdates = () => {
useStore().dispatch(ActionTypes.POP_TILE_UPDATES, 10).then(updates => {
for(const update of updates) {
// console.log('Updating tile ' + update.name);
layer.updateNamedTile(update.name, update.timestamp);
}
if(pendingUpdates.value) {
console.log('More updates left, scheduling frame');
// eslint-disable-next-line no-unused-vars
updateFrame = requestAnimationFrame(() => handlePendingUpdates());
} else {

View File

@ -72,7 +72,6 @@ export default defineComponent({
},
unmounted() {
// console.log('Unmounted markerSetLayer');
this.leaflet.getLayerManager().removeLayer(this.layerGroup);
},

View File

@ -55,15 +55,12 @@ export default defineComponent({
},
mounted() {
// console.log('Mounted playersLayer');
if(!this.componentSettings!.hideByDefault) {
// console.log('Adding playersLayer');
this.leaflet.getLayerManager().addLayer(this.layerGroup, true, useStore().state.messages.players, 1);
}
},
unmounted() {
// console.log('Unmounted playersLayer');
this.leaflet.removeLayer(this.layerGroup);
},

View File

@ -89,10 +89,6 @@ export default defineComponent({
pane: 'players',
});
if(this.currentWorld) {
console.log(this.currentWorld.name, this.player.location.world);
}
if(this.currentWorld && this.currentWorld.name === this.player.location.world) {
this.enableLayer();
}

View File

@ -78,16 +78,13 @@ export default defineComponent({
for(const update of updates) {
if(update.removed) {
// console.log(`Deleting area ${update.id}`);
deleteArea(update.id);
} else {
// console.log(`Updating/creating area ${update.id}`);
layers.set(update.id, updateArea(layers.get(update.id), update.payload as DynmapArea, converter));
}
}
if(pendingUpdates.value) {
console.log('More updates left, scheduling frame');
// eslint-disable-next-line no-unused-vars
updateFrame = requestAnimationFrame(() => handlePendingUpdates());
} else {

View File

@ -78,10 +78,8 @@ export default defineComponent({
for(const update of updates) {
if(update.removed) {
// console.log(`Deleting circle ${update.id}`);
deleteCircle(update.id);
} else {
// console.log(`Updating/creating circle ${update.id}`);
const layer = updateCircle(layers.get(update.id), update.payload as DynmapCircle, converter)
if(!layers.has(update.id)) {
@ -92,7 +90,6 @@ export default defineComponent({
}
if(pendingUpdates.value) {
console.log('More updates left, scheduling frame');
// eslint-disable-next-line no-unused-vars
updateFrame = requestAnimationFrame(() => handlePendingUpdates());
} else {

View File

@ -78,10 +78,8 @@ export default defineComponent({
for(const update of updates) {
if(update.removed) {
// console.log(`Deleting line ${update.id}`);
deleteLine(update.id);
} else {
// console.log(`Updating/creating line ${update.id}`);
const layer = updateLine(layers.get(update.id), update.payload as DynmapLine, converter)
if(!layers.has(update.id)) {
@ -92,7 +90,6 @@ export default defineComponent({
}
if(pendingUpdates.value) {
console.log('More updates left, scheduling frame');
// eslint-disable-next-line no-unused-vars
updateFrame = requestAnimationFrame(() => handlePendingUpdates());
} else {

View File

@ -77,16 +77,13 @@ export default defineComponent({
for(const update of updates) {
if(update.removed) {
// console.log(`Deleting marker ${update.id}`);
deleteMarker(update.id);
} else {
// console.log(`Updating/creating marker ${update.id}`);
layers.set(update.id, updateMarker(layers.get(update.id), update.payload as DynmapMarker, projection));
}
}
if(pendingUpdates.value) {
console.log('More updates left, scheduling frame');
// eslint-disable-next-line no-unused-vars
updateFrame = requestAnimationFrame(() => handlePendingUpdates());
} else {

View File

@ -182,7 +182,7 @@ export const actions: ActionTree<State, State> & Actions = {
[ActionTypes.POP_MARKER_UPDATES]({commit, state}, {markerSet, amount}: {markerSet: string, amount: number}): Promise<DynmapMarkerUpdate[]> {
if(!state.markerSets.has(markerSet)) {
console.log(`Marker set ${markerSet} doesn't exist`);
console.warn(`POP_MARKER_UPDATES: Marker set ${markerSet} doesn't exist`);
return Promise.resolve([]);
}
@ -195,7 +195,7 @@ export const actions: ActionTree<State, State> & Actions = {
[ActionTypes.POP_AREA_UPDATES]({commit, state}, {markerSet, amount}: {markerSet: string, amount: number}): Promise<DynmapAreaUpdate[]> {
if(!state.markerSets.has(markerSet)) {
console.log(`Marker set ${markerSet} doesn't exist`);
console.warn(`POP_AREA_UPDATES: Marker set ${markerSet} doesn't exist`);
return Promise.resolve([]);
}
@ -208,7 +208,7 @@ export const actions: ActionTree<State, State> & Actions = {
[ActionTypes.POP_CIRCLE_UPDATES]({commit, state}, {markerSet, amount}: {markerSet: string, amount: number}): Promise<DynmapCircleUpdate[]> {
if(!state.markerSets.has(markerSet)) {
console.log(`Marker set ${markerSet} doesn't exist`);
console.warn(`POP_CIRCLE_UPDATES: Marker set ${markerSet} doesn't exist`);
return Promise.resolve([]);
}
@ -221,7 +221,7 @@ export const actions: ActionTree<State, State> & Actions = {
[ActionTypes.POP_LINE_UPDATES]({commit, state}, {markerSet, amount}: {markerSet: string, amount: number}): Promise<DynmapLineUpdate[]> {
if(!state.markerSets.has(markerSet)) {
console.log(`Marker set ${markerSet} doesn't exist`);
console.warn(`POP_LINE_UPDATES: Marker set ${markerSet} doesn't exist`);
return Promise.resolve([]);
}

View File

@ -140,7 +140,7 @@ export const mutations: MutationTree<State> & Mutations = {
[MutationTypes.ADD_MARKER_SET_UPDATES](state: State, updates: Map<string, DynmapMarkerSetUpdates>) {
for(const entry of updates) {
if(!state.markerSets.has(entry[0])) {
console.log(`Marker set ${entry[0]} doesn't exist`);
console.warn(`ADD_MARKER_SET_UPDATES: Marker set ${entry[0]} doesn't exist`);
continue;
}
@ -201,7 +201,7 @@ export const mutations: MutationTree<State> & Mutations = {
//Pops the specified number of marker updates from the pending updates list
[MutationTypes.POP_MARKER_UPDATES](state: State, {markerSet, amount}) {
if(!state.markerSets.has(markerSet)) {
console.log(`Marker set ${markerSet} doesn't exist`);
console.warn(`POP_MARKER_UPDATES: Marker set ${markerSet} doesn't exist`);
return;
}
@ -211,7 +211,7 @@ export const mutations: MutationTree<State> & Mutations = {
//Pops the specified number of area updates from the pending updates list
[MutationTypes.POP_AREA_UPDATES](state: State, {markerSet, amount}) {
if(!state.markerSets.has(markerSet)) {
console.log(`Marker set ${markerSet} doesn't exist`);
console.warn(`POP_AREA_UPDATES: Marker set ${markerSet} doesn't exist`);
return;
}
@ -221,7 +221,7 @@ export const mutations: MutationTree<State> & Mutations = {
//Pops the specified number of circle updates from the pending updates list
[MutationTypes.POP_CIRCLE_UPDATES](state: State, {markerSet, amount}) {
if(!state.markerSets.has(markerSet)) {
console.log(`Marker set ${markerSet} doesn't exist`);
console.warn(`POP_CIRCLE_UPDATES: Marker set ${markerSet} doesn't exist`);
return;
}
@ -231,7 +231,7 @@ export const mutations: MutationTree<State> & Mutations = {
//Pops the specified number of line updates from the pending updates list
[MutationTypes.POP_LINE_UPDATES](state: State, {markerSet, amount}) {
if(!state.markerSets.has(markerSet)) {
console.log(`Marker set ${markerSet} doesn't exist`);
console.warn(`POP_LINE_UPDATES: Marker set ${markerSet} doesn't exist`);
return;
}

View File

@ -51,7 +51,7 @@ export default {
};
faceImage.onerror = function() {
console.error('Failed to retrieve face of "', player, '" with size "', size, '"!');
console.warn('Failed to retrieve face of "', player, '" with size "', size, '"!');
reject();
};