标记
This commit is contained in:
parent
1fd86cd469
commit
802693c2af
@ -1863,7 +1863,7 @@ const markFormSubmit = async () => {
|
|||||||
let point = JSON.parse(res)
|
let point = JSON.parse(res)
|
||||||
console.log(point)
|
console.log(point)
|
||||||
let pointPx = convertActualToBrowser(point.x, point.y)
|
let pointPx = convertActualToBrowser(point.x, point.y)
|
||||||
let actualPoint = disposeEventPoint(pointPx.x, pointPx.y)
|
console.log(pointPx)
|
||||||
|
|
||||||
if (state.currentItemIndex !== -1) {
|
if (state.currentItemIndex !== -1) {
|
||||||
state.allMapPointInfo[state.currentItemIndex].locationYaw = point.yaw
|
state.allMapPointInfo[state.currentItemIndex].locationYaw = point.yaw
|
||||||
@ -3073,8 +3073,8 @@ const disposeEventPoint = (x, y) => {
|
|||||||
// 传入实际现场的数据,转换成浏览器坐标的数据
|
// 传入实际现场的数据,转换成浏览器坐标的数据
|
||||||
const convertActualToBrowser = (pointX, pointY) => {
|
const convertActualToBrowser = (pointX, pointY) => {
|
||||||
const y1 = Number(imgBgObj.origin[1]) + Number(imgBgObj.height) * Number(imgBgObj.resolution)
|
const y1 = Number(imgBgObj.origin[1]) + Number(imgBgObj.height) * Number(imgBgObj.resolution)
|
||||||
let x = Math.max(Number(pointX) - Number(imgBgObj.origin[0]), 0)
|
let x = Math.max(Number(pointX) - Number(imgBgObj.origin[0]), 0) / Number(imgBgObj.resolution)
|
||||||
let y = Math.max(y1 - Number(pointY), 0)
|
let y = Math.max(y1 - Number(pointY), 0) / Number(imgBgObj.resolution)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
x,
|
x,
|
||||||
|
Loading…
Reference in New Issue
Block a user