diff --git a/packages/client/src/tiptap/core/wrappers/flow/index.tsx b/packages/client/src/tiptap/core/wrappers/flow/index.tsx index 3c5956d2..f3785f5d 100644 --- a/packages/client/src/tiptap/core/wrappers/flow/index.tsx +++ b/packages/client/src/tiptap/core/wrappers/flow/index.tsx @@ -9,7 +9,8 @@ import { Flow } from 'tiptap/core/extensions/flow'; import { decode } from './decode'; import styles from './index.module.scss'; -const INHERIT_SIZE_STYLE = { width: '100%', height: '100%', maxWidth: '100%' }; +const INHERIT_SIZE_STYLE = { width: '100%', height: '100%', maxWidth: '100%', overflow: 'hidden', padding: '1rem' }; +const ICON_STYLE = { fontSize: '0.85em' }; export const FlowWrapper = ({ editor, node, updateAttributes }) => { const $container = useRef(); @@ -63,6 +64,7 @@ export const FlowWrapper = ({ editor, node, updateAttributes }) => { graph.setTooltips(false); graph.setEnabled(false); graph.centerZoom = true; + $graph.current = graph; } @@ -85,8 +87,8 @@ export const FlowWrapper = ({ editor, node, updateAttributes }) => { ref={$container} id={containerId.current} className={cls(styles.renderWrap, 'render-wrapper')} - style={{ ...INHERIT_SIZE_STYLE, overflow: 'hidden' }} - > + style={INHERIT_SIZE_STYLE} + />