enhance hover zone
This commit is contained in:
@@ -29,13 +29,11 @@ function ZoneLabelEditor({ zoneId }: { zoneId: ZoneNode['id'] }) {
|
|||||||
const el = document.getElementById(`${zoneId}-label`)
|
const el = document.getElementById(`${zoneId}-label`)
|
||||||
if (!el) return
|
if (!el) return
|
||||||
setLabelEl(el)
|
setLabelEl(el)
|
||||||
el.style.pointerEvents = 'auto'
|
|
||||||
|
|
||||||
const textEl = el.children[0] as HTMLElement | undefined
|
const textEl = el.children[0] as HTMLElement | undefined
|
||||||
if (textEl) textEl.style.display = 'none'
|
if (textEl) textEl.style.display = 'none'
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
el.style.pointerEvents = ''
|
|
||||||
if (textEl) textEl.style.display = ''
|
if (textEl) textEl.style.display = ''
|
||||||
}
|
}
|
||||||
}, [zoneId])
|
}, [zoneId])
|
||||||
@@ -79,6 +77,7 @@ function ZoneLabelEditor({ zoneId }: { zoneId: ZoneNode['id'] }) {
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontFamily: 'sans-serif',
|
fontFamily: 'sans-serif',
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
|
pointerEvents: 'auto',
|
||||||
display: 'inline-flex',
|
display: 'inline-flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
gap: 4,
|
gap: 4,
|
||||||
|
|||||||
Reference in New Issue
Block a user