You've already forked SmartisanNote.Remake
\"feat: 调整图片拖拽排序阈值为覆盖目标图片三分之二高度\"
This commit is contained in:
@@ -1048,7 +1048,8 @@ const checkAndSwapImages = (draggedImg, deltaY) => {
|
|||||||
const targetCenterY = targetRect.top + targetRect.height / 2
|
const targetCenterY = targetRect.top + targetRect.height / 2
|
||||||
|
|
||||||
// 检查是否与目标图片重叠,使用更精确的碰撞检测
|
// 检查是否与目标图片重叠,使用更精确的碰撞检测
|
||||||
const overlapThreshold = (draggedRect.height + targetRect.height) * 0.4 // 调整阈值使交换更灵敏
|
// 当拖拽图片覆盖目标图片高度的三分之二时触发排序
|
||||||
|
const overlapThreshold = targetRect.height * 0.67
|
||||||
const distance = Math.abs(draggedCenterY - targetCenterY)
|
const distance = Math.abs(draggedCenterY - targetCenterY)
|
||||||
|
|
||||||
if (distance < overlapThreshold) {
|
if (distance < overlapThreshold) {
|
||||||
|
|||||||
Reference in New Issue
Block a user