From 423d0e73bd83d0bc50ca3e09ffb2452bc1fc4c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=A0=E6=8D=89=E4=B8=8D=E5=88=B0=E7=9A=84this?= <2228429150@qq.com> Date: Sun, 4 Feb 2024 14:28:43 +0800 Subject: [PATCH] fix: update zoomable options and control style (#455) * fix: update zoomable options * fix: update control style --- packages/core/src/components/Graph.tsx | 1 + packages/core/src/styles/index.less | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/packages/core/src/components/Graph.tsx b/packages/core/src/components/Graph.tsx index 23725531..9100ef88 100644 --- a/packages/core/src/components/Graph.tsx +++ b/packages/core/src/components/Graph.tsx @@ -113,6 +113,7 @@ const XFlowGraph = (props: GraphOptions) => { graph.options.mousewheel = { ...Options.defaults.mousewheel, ...zoomOptions, + enabled: true, }; } else { graph.disableMouseWheel(); diff --git a/packages/core/src/styles/index.less b/packages/core/src/styles/index.less index a2d290df..e2accc95 100644 --- a/packages/core/src/styles/index.less +++ b/packages/core/src/styles/index.less @@ -60,6 +60,10 @@ user-select: none; touch-action: manipulation; cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: rgb(0, 0, 0); &:disabled { background-color: rgba(0, 0, 0, 0.04);