Prevent unnecessary marker repositioning on world change
This commit is contained in:
parent
0aa61517dc
commit
d37657d3e2
@ -101,9 +101,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//FIXME: Prevent unnecessary repositioning when changing worlds
|
watch(currentMap, (newValue, oldValue) => {
|
||||||
watch(currentMap, (newValue) => {
|
if(newValue && (!oldValue || oldValue.world === newValue.world)) {
|
||||||
if(newValue) {
|
|
||||||
const converter = getPointConverter();
|
const converter = getPointConverter();
|
||||||
|
|
||||||
for (const [id, area] of props.set.areas) {
|
for (const [id, area] of props.set.areas) {
|
||||||
|
@ -101,9 +101,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//FIXME: Prevent unnecessary repositioning when changing worlds
|
watch(currentMap, (newValue, oldValue) => {
|
||||||
watch(currentMap, (newValue) => {
|
if(newValue && (!oldValue || oldValue.world === newValue.world)) {
|
||||||
if(newValue) {
|
|
||||||
const converter = getPointConverter();
|
const converter = getPointConverter();
|
||||||
|
|
||||||
for (const [id, circle] of props.set.circles) {
|
for (const [id, circle] of props.set.circles) {
|
||||||
|
@ -100,9 +100,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//FIXME: Prevent unnecessary repositioning when changing worlds
|
watch(currentMap, (newValue, oldValue) => {
|
||||||
watch(currentMap, (newValue) => {
|
if(newValue && (!oldValue || oldValue.world === newValue.world)) {
|
||||||
if(newValue) {
|
|
||||||
const converter = getPointConverter();
|
const converter = getPointConverter();
|
||||||
|
|
||||||
for (const [id, line] of props.set.lines) {
|
for (const [id, line] of props.set.lines) {
|
||||||
|
@ -100,9 +100,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//FIXME: Prevent unnecessary repositioning when changing worlds
|
watch(currentMap, (newValue, oldValue) => {
|
||||||
watch(currentMap, (newValue) => {
|
if(newValue && (!oldValue || oldValue.world === newValue.world)) {
|
||||||
if(newValue) {
|
|
||||||
for (const [id, marker] of props.set.markers) {
|
for (const [id, marker] of props.set.markers) {
|
||||||
updateMarker(layers.get(id), marker, getPointConverter());
|
updateMarker(layers.get(id), marker, getPointConverter());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user