编辑地图优化
This commit is contained in:
parent
25035ac4cf
commit
e31a75fdd3
@ -2020,9 +2020,40 @@ const pasteNode = () => {
|
||||
}
|
||||
//移动工具表单提交
|
||||
const moveFormSubmit = async () => {
|
||||
state.allMapPointInfo[state.currentItemIndex].locationX = Number(state.moveForm.locationX)
|
||||
state.allMapPointInfo[state.currentItemIndex].locationY = Number(state.moveForm.locationY)
|
||||
addEditHistory()
|
||||
if (state.moveForm.locationX && state.moveForm.locationY) {
|
||||
let x = Number(state.moveForm.locationX)
|
||||
let y = Number(state.moveForm.locationY)
|
||||
let item = state.allMapPointInfo[state.currentItemIndex]
|
||||
|
||||
if (x === item.locationX && y === item.locationY) return
|
||||
let actualPoint = disposeEventPoint(x, y)
|
||||
item.locationX = x
|
||||
item.locationY = y
|
||||
item.actualLocationX = actualPoint.actualLocationX
|
||||
item.actualLocationY = actualPoint.actualLocationY
|
||||
//更改路线里的
|
||||
state.mapRouteList.forEach((route) => {
|
||||
if (item.id === route.startingPointId) {
|
||||
route.startPointX = x
|
||||
route.startPointY = y
|
||||
route.beginHigh = Number(item.locationDeepPx)
|
||||
route.beginWidth = Number(item.locationWidePx)
|
||||
route.actualStartPointX = actualPoint.actualLocationX
|
||||
route.actualStartPointY = actualPoint.actualLocationY
|
||||
}
|
||||
if (item.id === route.endPointId) {
|
||||
route.endPointX = x
|
||||
route.endPointY = y
|
||||
route.endHigh = Number(item.locationDeepPx)
|
||||
route.endWidth = Number(item.locationWidePx)
|
||||
route.actualEndPointX = actualPoint.actualLocationX
|
||||
route.actualEndPointY = actualPoint.actualLocationY
|
||||
}
|
||||
})
|
||||
addEditHistory()
|
||||
} else {
|
||||
message.warning('请输入x和y')
|
||||
}
|
||||
}
|
||||
//旋转工具表单提交
|
||||
const rotationFormSubmit = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user