From 8d997f3350f22d80f6ec48204018b8fed7e8911d Mon Sep 17 00:00:00 2001 From: Axel Bocciarelli Date: Fri, 11 Aug 2023 16:33:00 +0200 Subject: [PATCH] Allow interacting with canvas through other interactive elements --- .../storybook/src/FloatingToolbar.stories.tsx | 3 ++- packages/lib/src/interactions/hooks.ts | 25 ++++++++++++------- .../lib/src/vis/shared/VisCanvas.module.css | 1 + 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/apps/storybook/src/FloatingToolbar.stories.tsx b/apps/storybook/src/FloatingToolbar.stories.tsx index 1d1d89c6a..436b31fc3 100644 --- a/apps/storybook/src/FloatingToolbar.stories.tsx +++ b/apps/storybook/src/FloatingToolbar.stories.tsx @@ -1,4 +1,4 @@ -import { FloatingControl, VisCanvas } from '@h5web/lib'; +import { DefaultInteractions, FloatingControl, VisCanvas } from '@h5web/lib'; import { useToggle } from '@react-hookz/web'; import type { Meta, StoryObj } from '@storybook/react'; @@ -24,6 +24,7 @@ export const Default = { ordinateConfig={{ visDomain: [50, 100], showGrid: true }} title={withTitle ? 'Plot title' : undefined} > +