fix: improve element label positioning and state management

- Fix element label positioning using getBoundingClientRect + scroll offset
- Filter out state classes from element selectors (element-hovered, etc.)
- Add cursor pointer on hovered elements and pages
- Prevent elements from having both hovered and selected classes
- Fix issue where closing popup left previous element in hovered state

Ensures only one visual state per element at a time and cleaner
selector display in labels.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
isUnknown 2025-12-08 16:35:28 +01:00
parent f9e9e65712
commit 5b5c65722b
3 changed files with 104 additions and 22 deletions

View file

@ -147,6 +147,7 @@
/* Hover and selection states for pages and elements */
.page-hovered {
outline: 2px solid #ff8a5050 !important;
cursor: pointer !important;
}
.page-selected {
@ -155,6 +156,7 @@
.element-hovered {
outline: 2px solid #7136ff50 !important;
cursor: pointer !important;
}
.element-selected {