Skip to content

Commit 9537f8d

Browse files
committed
fix:聚焦修复
1 parent dcaf7f5 commit 9537f8d

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jx3box/jx3box-map",
3-
"version": "1.1.11",
3+
"version": "1.1.12",
44
"description": "JX3BOX Game Map",
55
"main": "index.js",
66
"files": [

src/components/Map.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export default {
311311
if (this.focus != undefined) {
312312
return this.datas[this.focus];
313313
}
314-
return this.datas.find((d) => d.focus) ?? null;
314+
return this.datas.find((d) => d.focus) ?? this.datas[0] ?? null;
315315
},
316316
// 内层容器相对外层容器偏移
317317
innerStyle() {
@@ -423,6 +423,12 @@ export default {
423423
this.initInnerOffset(this.focusPoint);
424424
});
425425
},
426+
datas() {
427+
if (this.effectiveOverview) return;
428+
this.$nextTick(() => {
429+
this.initInnerOffset(this.focusPoint);
430+
});
431+
},
426432
effectiveOverview() {
427433
this.currentZoomScale = 1;
428434
this.$nextTick(() => {

0 commit comments

Comments
 (0)