mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 06:08:12 +08:00
Build radio widget entries from choice type metadata so variants display their icons (#4408)
* Build radio widget entries from choice type metadata so variants display their icons * Route the node properties enum radio through the shared choice type entry builder
This commit is contained in:
@@ -89,7 +89,13 @@ export function destroyTooltipStore() {
|
||||
|
||||
// Listen for mouse movements onto tooltip-bearing HTML elements to track the future target of a tooltip
|
||||
function onMouseOver(e: MouseEvent) {
|
||||
const element = (e.target instanceof Element && e.target.closest("[data-tooltip-label], [data-tooltip-description], [data-tooltip-shortcut]")) || undefined;
|
||||
const target = (e.target instanceof Element && e.target) || undefined;
|
||||
let element = target?.closest("[data-tooltip-label], [data-tooltip-description], [data-tooltip-shortcut]") || undefined;
|
||||
|
||||
// A floating menu renders within the DOM of the widget that spawned it, so a match beyond the menu's own content
|
||||
// is the spawner's tooltip rather than one belonging to whatever the cursor is actually over
|
||||
const floatingMenuContent = target?.closest("[data-floating-menu-content]");
|
||||
if (element && floatingMenuContent && !floatingMenuContent.contains(element)) element = undefined;
|
||||
|
||||
update((state) => {
|
||||
state.visible = false;
|
||||
|
||||
Reference in New Issue
Block a user