UNPKG

ze-react-component-library

Version:
41 lines (37 loc) 840 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useGraphConfig = void 0; var _xflow = require("@antv/xflow"); var useGraphConfig = (0, _xflow.createGraphConfig)(function (config) { /** 预设XFlow画布配置项 */ config.setX6Config({ grid: true, scroller: { enabled: true }, scaling: { min: 0.2, max: 3 }, connecting: { /** 连线过程中距离目标节点50px时自动吸附 */ snap: { radius: 50 }, connector: { name: 'rounded', args: { radius: 50 } }, router: { name: 'er' }, /** 不允许连接到画布空白位置, 即没有目标节点时连线会自动消失 */ allowBlank: false } }); }); exports.useGraphConfig = useGraphConfig;