fix: adjust drag handle vertical positioning for smaller size
- Update line height calculation from 24px to 20px handle height - Remove extra 4px offset that was compensating for old size - Handle now properly aligns with text baseline 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5e9df976e3
commit
8f884af5d7
1 changed files with 2 additions and 2 deletions
|
|
@ -324,7 +324,7 @@ export function DragHandlePlugin(options: GlobalDragHandleOptions & { pluginKey:
|
|||
const lineHeight = isNaN(parsedLineHeight)
|
||||
? parseInt(compStyle.fontSize) * 1.2
|
||||
: parsedLineHeight
|
||||
rect.top += (lineHeight - 24) / 2
|
||||
rect.top += (lineHeight - 20) / 2
|
||||
rect.top += paddingTop
|
||||
}
|
||||
// Li markers
|
||||
|
|
@ -341,7 +341,7 @@ export function DragHandlePlugin(options: GlobalDragHandleOptions & { pluginKey:
|
|||
// Add 12px gap between drag handle and content
|
||||
// Position the handle inside the padding area, close to the text
|
||||
dragHandleElement.style.left = `${rect.left + paddingLeft - rect.width - 12}px`
|
||||
dragHandleElement.style.top = `${rect.top - 4}px` // Offset for padding
|
||||
dragHandleElement.style.top = `${rect.top}px`
|
||||
showDragHandle()
|
||||
},
|
||||
keydown: () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue