Keep PDF annotation controls hoverable
This commit is contained in:
parent
7fa3414308
commit
2cf7f24afc
1 changed files with 7 additions and 2 deletions
|
|
@ -1111,7 +1111,7 @@ import * as Modals from './modalManager.js';
|
|||
if (_pdfPaneProximityWired || !pane) return;
|
||||
_pdfPaneProximityWired = true;
|
||||
let raf = 0;
|
||||
const buffer = 30;
|
||||
const buffer = 44;
|
||||
pane.addEventListener('mousemove', (ev) => {
|
||||
if (raf) return;
|
||||
raf = requestAnimationFrame(() => {
|
||||
|
|
@ -1469,7 +1469,12 @@ import * as Modals from './modalManager.js';
|
|||
};
|
||||
if (!_isTouch) {
|
||||
wrap.addEventListener('mouseenter', () => _setHandlesVisible(true));
|
||||
wrap.addEventListener('mouseleave', () => _setHandlesVisible(false));
|
||||
// Handles intentionally sit outside the annotation rectangle. Hiding on
|
||||
// wrap mouseleave makes them disappear while moving toward those controls;
|
||||
// pane-level proximity below owns hiding once the cursor is genuinely away.
|
||||
for (const h of [del, grip, resize, menuBtn].filter(Boolean)) {
|
||||
h.addEventListener('mouseenter', () => _setHandlesVisible(true));
|
||||
}
|
||||
}
|
||||
wrap.addEventListener('pointerdown', (ev) => {
|
||||
if (ev.target === del || ev.target === grip || ev.target === resize || ev.target === menuBtn) return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue