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) => {
|
||||
if(newValue) {
|
||||
watch(currentMap, (newValue, oldValue) => {
|
||||
if(newValue && (!oldValue || oldValue.world === newValue.world)) {
|
||||
const converter = getPointConverter();
|
||||
|
||||
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) => {
|
||||
if(newValue) {
|
||||
watch(currentMap, (newValue, oldValue) => {
|
||||
if(newValue && (!oldValue || oldValue.world === newValue.world)) {
|
||||
const converter = getPointConverter();
|
||||
|
||||
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) => {
|
||||
if(newValue) {
|
||||
watch(currentMap, (newValue, oldValue) => {
|
||||
if(newValue && (!oldValue || oldValue.world === newValue.world)) {
|
||||
const converter = getPointConverter();
|
||||
|
||||
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) => {
|
||||
if(newValue) {
|
||||
watch(currentMap, (newValue, oldValue) => {
|
||||
if(newValue && (!oldValue || oldValue.world === newValue.world)) {
|
||||
for (const [id, marker] of props.set.markers) {
|
||||
updateMarker(layers.get(id), marker, getPointConverter());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user