|
@@ -68,6 +68,7 @@ export const Demo: React.FC<IProps> = props => {
|
|
|
const onLoad: IAppLoad = async app => {
|
|
|
appRef.current = app;
|
|
|
graphRef.current = await app.getGraphInstance();
|
|
|
+ // graphRef.current.disableSnapline()
|
|
|
renderGraph();
|
|
|
};
|
|
|
|
|
@@ -88,11 +89,19 @@ export const Demo: React.FC<IProps> = props => {
|
|
|
};
|
|
|
const getConfig = () => {
|
|
|
const defaultOption = {
|
|
|
+ grid: 1,
|
|
|
mousewheel: {
|
|
|
enabled: true,
|
|
|
/** 将鼠标位置作为中心缩放 */
|
|
|
zoomAtMousePosition: true,
|
|
|
},
|
|
|
+ resizing: {
|
|
|
+ enabled: true,
|
|
|
+ minWidth: 0,
|
|
|
+ minHeight: 0,
|
|
|
+ preserveAspectRatio: false,
|
|
|
+ },
|
|
|
+ snapline: false
|
|
|
};
|
|
|
return isEdit
|
|
|
? defaultOption
|