|
@@ -57,7 +57,7 @@
|
|
height: '18px',
|
|
height: '18px',
|
|
background: t.id === 0 ? 'red' : t.id === 1 ? 'blue' : 'green',
|
|
background: t.id === 0 ? 'red' : t.id === 1 ? 'blue' : 'green',
|
|
borderRadius: '50%',
|
|
borderRadius: '50%',
|
|
- transform: `translate3d(${t.displayX + 200}px, ${-t.displayY + 200}px, 0) translate(-50%, -50%)`,
|
|
|
|
|
|
+ transform: `translate3d(${t.displayX}px, ${-t.displayY}px, 0) translate(-50%, -50%)`,
|
|
zIndex: 10,
|
|
zIndex: 10,
|
|
transition: 'transform 1s linear',
|
|
transition: 'transform 1s linear',
|
|
willChange: 'transform',
|
|
willChange: 'transform',
|
|
@@ -129,7 +129,7 @@
|
|
height: '18px',
|
|
height: '18px',
|
|
background: t.id === 0 ? 'red' : t.id === 1 ? 'blue' : 'green',
|
|
background: t.id === 0 ? 'red' : t.id === 1 ? 'blue' : 'green',
|
|
borderRadius: '50%',
|
|
borderRadius: '50%',
|
|
- transform: `translate3d(${t.displayX + 200}px, ${-t.displayY + 200}px, 0) translate(-50%, -50%)`,
|
|
|
|
|
|
+ transform: `translate3d(${t.displayX}px, ${-t.displayY}px, 0) translate(-50%, -50%)`,
|
|
zIndex: 10,
|
|
zIndex: 10,
|
|
transition: 'transform 1s linear',
|
|
transition: 'transform 1s linear',
|
|
willChange: 'transform',
|
|
willChange: 'transform',
|
|
@@ -637,7 +637,17 @@ onMounted(() => {
|
|
const [x, y, z, id] = item
|
|
const [x, y, z, id] = item
|
|
currentIds.add(id)
|
|
currentIds.add(id)
|
|
if (!(id in targets)) {
|
|
if (!(id in targets)) {
|
|
- targets[id] = { x, y, z, id, displayX: x, displayY: y, lastX: x, lastY: y }
|
|
|
|
|
|
+ // targets[id] = { x, y, z, id, displayX: x, displayY: y, lastX: x, lastY: y }
|
|
|
|
+ targets[id] = {
|
|
|
|
+ x,
|
|
|
|
+ y,
|
|
|
|
+ z,
|
|
|
|
+ id,
|
|
|
|
+ displayX: x - Number(detailState.value.xxStart),
|
|
|
|
+ displayY: y - Number(detailState.value.yyEnd),
|
|
|
|
+ lastX: x,
|
|
|
|
+ lastY: y,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 去抖动
|
|
// 去抖动
|
|
const dx = x - targets[id].lastX
|
|
const dx = x - targets[id].lastX
|
|
@@ -648,8 +658,10 @@ onMounted(() => {
|
|
targets[id].z = z
|
|
targets[id].z = z
|
|
targets[id].lastX = x
|
|
targets[id].lastX = x
|
|
targets[id].lastY = y
|
|
targets[id].lastY = y
|
|
- targets[id].displayX = x
|
|
|
|
- targets[id].displayY = y
|
|
|
|
|
|
+ // targets[id].displayX = x
|
|
|
|
+ // targets[id].displayY = y
|
|
|
|
+ targets[id].displayX = x - Number(detailState.value.xxStart)
|
|
|
|
+ targets[id].displayY = y - Number(detailState.value.yyEnd)
|
|
// console.log(`🔄 更新目标点: id=${id}, x=${x}, y=${y}`, targets[id])
|
|
// console.log(`🔄 更新目标点: id=${id}, x=${x}, y=${y}`, targets[id])
|
|
} else {
|
|
} else {
|
|
// 距离太小,忽略本次更新
|
|
// 距离太小,忽略本次更新
|