Skip to content

Commit

Permalink
馃悰 fix: platform
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Apr 7, 2023
1 parent 97d65ad commit f49397b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/FlowEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const nodeTypes = { [NODE_IDENTIFIER]: NodeComponent }

const FlowEditor: React.FC = () => {
const theme = useTheme()
const isWindows = navigator.platform.includes('Win')
const reactFlowRef: any = useRef(null)
const edgeUpdateSuccessful = useRef(true)
const [reactFlowInstance, setReactFlowInstance] = useState<any>(null)
Expand Down Expand Up @@ -127,8 +128,8 @@ const FlowEditor: React.FC = () => {
nodeTypes={nodeTypes}
deleteKeyCode={['Delete', 'Backspace']}
multiSelectionKeyCode={['Shift']}
panOnScroll
zoomOnScroll={false}
panOnScroll={!isWindows}
zoomOnScroll={isWindows}
onlyRenderVisibleElements
disableKeyboardA11y={true}
onNodesChange={onNodesChange}
Expand Down

0 comments on commit f49397b

Please sign in to comment.