This commit is contained in:
yyy 2025-04-11 11:24:46 +08:00
parent 1fd86cd469
commit 802693c2af

View File

@ -1863,7 +1863,7 @@ const markFormSubmit = async () => {
let point = JSON.parse(res)
console.log(point)
let pointPx = convertActualToBrowser(point.x, point.y)
let actualPoint = disposeEventPoint(pointPx.x, pointPx.y)
console.log(pointPx)
if (state.currentItemIndex !== -1) {
state.allMapPointInfo[state.currentItemIndex].locationYaw = point.yaw
@ -3073,8 +3073,8 @@ const disposeEventPoint = (x, y) => {
//
const convertActualToBrowser = (pointX, pointY) => {
const y1 = Number(imgBgObj.origin[1]) + Number(imgBgObj.height) * Number(imgBgObj.resolution)
let x = Math.max(Number(pointX) - Number(imgBgObj.origin[0]), 0)
let y = Math.max(y1 - Number(pointY), 0)
let x = Math.max(Number(pointX) - Number(imgBgObj.origin[0]), 0) / Number(imgBgObj.resolution)
let y = Math.max(y1 - Number(pointY), 0) / Number(imgBgObj.resolution)
return {
x,