Use async/await in more places
This commit is contained in:
parent
a6ae811660
commit
a3aa04c2dd
@ -73,8 +73,9 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
|
||||
handlePendingUpdates = () => {
|
||||
useStore().dispatch(ActionTypes.POP_TILE_UPDATES, 10).then(updates => {
|
||||
handlePendingUpdates = async () => {
|
||||
const updates = await useStore().dispatch(ActionTypes.POP_TILE_UPDATES, 10);
|
||||
|
||||
for(const update of updates) {
|
||||
layer.updateNamedTile(update.name, update.timestamp);
|
||||
}
|
||||
@ -85,7 +86,6 @@ export default defineComponent({
|
||||
} else {
|
||||
updateFrame = 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
watch(active, (newValue) => newValue ? enableLayer() : disableLayer());
|
||||
|
@ -71,11 +71,12 @@ export default defineComponent({
|
||||
layers.delete(id);
|
||||
},
|
||||
|
||||
handlePendingUpdates = () => {
|
||||
useStore().dispatch(ActionTypes.POP_AREA_UPDATES, {
|
||||
handlePendingUpdates = async () => {
|
||||
const updates = await useStore().dispatch(ActionTypes.POP_AREA_UPDATES, {
|
||||
markerSet: props.set.id,
|
||||
amount: 10,
|
||||
}).then(updates => {
|
||||
});
|
||||
|
||||
const converter = getPointConverter();
|
||||
|
||||
for(const update of updates) {
|
||||
@ -98,7 +99,6 @@ export default defineComponent({
|
||||
} else {
|
||||
updateFrame = 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//FIXME: Prevent unnecessary repositioning when changing worlds
|
||||
|
@ -71,11 +71,12 @@ export default defineComponent({
|
||||
layers.delete(id);
|
||||
},
|
||||
|
||||
handlePendingUpdates = () => {
|
||||
useStore().dispatch(ActionTypes.POP_CIRCLE_UPDATES, {
|
||||
handlePendingUpdates = async () => {
|
||||
const updates = await useStore().dispatch(ActionTypes.POP_CIRCLE_UPDATES, {
|
||||
markerSet: props.set.id,
|
||||
amount: 10,
|
||||
}).then(updates => {
|
||||
});
|
||||
|
||||
const converter = getPointConverter();
|
||||
|
||||
for(const update of updates) {
|
||||
@ -98,7 +99,6 @@ export default defineComponent({
|
||||
} else {
|
||||
updateFrame = 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//FIXME: Prevent unnecessary repositioning when changing worlds
|
||||
|
@ -70,11 +70,12 @@ export default defineComponent({
|
||||
layers.delete(id);
|
||||
},
|
||||
|
||||
handlePendingUpdates = () => {
|
||||
useStore().dispatch(ActionTypes.POP_LINE_UPDATES, {
|
||||
handlePendingUpdates = async () => {
|
||||
const updates = await useStore().dispatch(ActionTypes.POP_LINE_UPDATES, {
|
||||
markerSet: props.set.id,
|
||||
amount: 10,
|
||||
}).then(updates => {
|
||||
});
|
||||
|
||||
const converter = getPointConverter();
|
||||
|
||||
for(const update of updates) {
|
||||
@ -97,7 +98,6 @@ export default defineComponent({
|
||||
} else {
|
||||
updateFrame = 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//FIXME: Prevent unnecessary repositioning when changing worlds
|
||||
|
@ -69,11 +69,12 @@ export default defineComponent({
|
||||
layers.delete(id);
|
||||
},
|
||||
|
||||
handlePendingUpdates = () => {
|
||||
useStore().dispatch(ActionTypes.POP_MARKER_UPDATES, {
|
||||
handlePendingUpdates = async () => {
|
||||
const updates = await useStore().dispatch(ActionTypes.POP_MARKER_UPDATES, {
|
||||
markerSet: props.set.id,
|
||||
amount: 10,
|
||||
}).then(updates => {
|
||||
});
|
||||
|
||||
const projection = currentProjection.value;
|
||||
|
||||
for(const update of updates) {
|
||||
@ -96,7 +97,6 @@ export default defineComponent({
|
||||
} else {
|
||||
updateFrame = 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//FIXME: Prevent unnecessary repositioning when changing worlds
|
||||
|
Loading…
Reference in New Issue
Block a user