From 572a8906effe3d757e1733579a8c29a9b0bcd13f Mon Sep 17 00:00:00 2001 From: hazigabriel Date: Fri, 26 Jan 2024 17:20:40 +0200 Subject: [PATCH] feat: add logic to toggle tooltip message on hover --- src/editor/LabelWrapper.jsx | 3 ++- src/editor/schema.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/editor/LabelWrapper.jsx b/src/editor/LabelWrapper.jsx index bf50dbd..a42705a 100644 --- a/src/editor/LabelWrapper.jsx +++ b/src/editor/LabelWrapper.jsx @@ -12,6 +12,7 @@ const LabelWrapper = (props) => { const { uid, always_show, + show_on_hover, label_type, label_pointing, tooltip_type, @@ -34,7 +35,7 @@ const LabelWrapper = (props) => { } position={tooltip_pointing} open={always_show || undefined} - on={!always_show ? 'click' : undefined} + on={show_on_hover ? 'hover' : 'click'} trigger={ label_type !== undefined && label_type !== 'simple' ? (