Skip to content

Commit cd60176

Browse files
committed
feat: 点位置调整相关功能
1 parent 48b516c commit cd60176

7 files changed

Lines changed: 20874 additions & 109 deletions

File tree

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,43 @@ export default {
7272
7373
### point-draggable
7474
75-
是否允许用户拖动点位。需要`:datas.sync="points"`
75+
是否允许用户移动点位。
7676
此时用户可以通过拖动点位来改变点位的坐标。
7777
78+
### map-follow
79+
80+
用户拖拽点位之后是否让地图跟随被拖拽的点居中。
81+
7882
### trim-border
7983
8084
是否移除地图边框。
8185
西山居的中地图图片是有边框的,默认不展示边框,如果需要展示可以设为`true`
8286
87+
## 事件
88+
89+
### map-move
90+
91+
用户拖拽地图之后触发
92+
93+
### point-move
94+
95+
用户拖拽点位之后触发
96+
97+
## 方法
98+
99+
### pointPosition(point) -> {left: ..., bottom: ...}
100+
101+
获得一个坐标(游戏坐标)在当前地图的中地图偏移(像素)
102+
103+
### gamePosition(left, bottom) -> {x: ..., y: ...}
104+
105+
和上面相反
106+
107+
### initInnerOffset(point)
108+
109+
移动inner,使得一个点尽可能居
110+
111+
83112
## slots
84113
85114
允许一些部分的自定义slot。

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import Jx3boxMap from "./src/components/Map.vue";
2+
3+
export default Jx3boxMap;

0 commit comments

Comments
 (0)