mirror of
https://github.com/ninglg/light-mindmap.git
synced 2026-07-22 06:51:49 +00:00
fix: improve drop indicators visibility and expand detection zones
This commit is contained in:
parent
10b7d53909
commit
05587234ac
2 changed files with 10 additions and 8 deletions
5
main.js
5
main.js
|
|
@ -1400,8 +1400,9 @@ class LightMindMapPlugin extends obsidian.Plugin {
|
|||
const relativeY = mouseY - rect.top;
|
||||
const height = rect.height;
|
||||
|
||||
if (relativeY < height * 0.25) return 'before';
|
||||
if (relativeY > height * 0.75) return 'after';
|
||||
// Expanded detection zones: 35% top = before, 35% bottom = after, middle = child
|
||||
if (relativeY < height * 0.35) return 'before';
|
||||
if (relativeY > height * 0.65) return 'after';
|
||||
return 'child';
|
||||
}
|
||||
|
||||
|
|
|
|||
13
styles.css
13
styles.css
|
|
@ -701,25 +701,26 @@
|
|||
50% { outline-color: rgba(99, 102, 241, 0.4); }
|
||||
}
|
||||
|
||||
/* Drop position indicators */
|
||||
/* Drop position indicators - outside node boundary for visibility */
|
||||
.lmm-drop-before,
|
||||
.lmm-drop-after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 3px;
|
||||
left: -12px;
|
||||
right: -12px;
|
||||
height: 4px;
|
||||
background: var(--lmm-theme-root-accent, #6366F1);
|
||||
border-radius: 2px;
|
||||
pointer-events: none;
|
||||
z-index: 100;
|
||||
box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
|
||||
}
|
||||
|
||||
.lmm-drop-before {
|
||||
top: -2px;
|
||||
top: -14px;
|
||||
}
|
||||
|
||||
.lmm-drop-after {
|
||||
bottom: -2px;
|
||||
bottom: -14px;
|
||||
}
|
||||
|
||||
/* Canvas dragging state */
|
||||
|
|
|
|||
Loading…
Reference in a new issue