mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
fix(docs): stop semantic-layer flow from trapping page scroll (#175)
Wheel events over the embedded ReactFlow diagram were captured by zoomOnScroll + preventScrolling, blocking page scroll once the pointer crossed into the diagram — even at min zoom. Disable wheel-zoom and let the page handle scroll, keep Cmd/Ctrl + scroll as the zoom escape hatch (default zoomActivationKeyCode), and remove the inaccessible Controls that sat at the bottom of the 2340px-tall canvas. Hint badge updated.
This commit is contained in:
parent
322e24fc02
commit
3db3e724cb
1 changed files with 3 additions and 5 deletions
|
|
@ -4,7 +4,6 @@ import { useCallback, useState } from "react";
|
|||
import {
|
||||
Background,
|
||||
BackgroundVariant,
|
||||
Controls,
|
||||
Handle,
|
||||
MarkerType,
|
||||
type Node,
|
||||
|
|
@ -1036,7 +1035,7 @@ export function SemanticLayerFlow() {
|
|||
}}
|
||||
>
|
||||
<div className="pointer-events-none absolute right-2.5 top-2.5 z-10 rounded border border-fd-border/50 bg-white/30 px-1.5 py-px font-mono text-[9.5px] font-medium uppercase tracking-[0.06em] text-fd-muted-foreground shadow-sm backdrop-blur-sm dark:bg-white/10">
|
||||
Pan / zoom
|
||||
Drag to pan • ⌘/Ctrl + scroll to zoom
|
||||
</div>
|
||||
<ReactFlow
|
||||
nodes={nodes}
|
||||
|
|
@ -1050,15 +1049,14 @@ export function SemanticLayerFlow() {
|
|||
elementsSelectable={false}
|
||||
panOnDrag
|
||||
panOnScroll={false}
|
||||
zoomOnScroll
|
||||
zoomOnScroll={false}
|
||||
zoomOnPinch
|
||||
zoomOnDoubleClick
|
||||
preventScrolling
|
||||
preventScrolling={false}
|
||||
minZoom={minZoom}
|
||||
maxZoom={1.5}
|
||||
proOptions={{ hideAttribution: true }}
|
||||
>
|
||||
<Controls position="bottom-right" showInteractive={false} />
|
||||
<Background
|
||||
variant={BackgroundVariant.Dots}
|
||||
gap={18}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue