feat: layout for combo. feat: nonoverlap for combo layout in first stage.

This commit is contained in:
Yanyan-Wang 2020-04-07 20:21:07 +08:00 committed by Yanyan Wang
parent ea48e70788
commit 21f58c2a71
2 changed files with 13 additions and 1 deletions

View File

@ -156,7 +156,6 @@ export default class ComboForce extends BaseLayout {
self.initVals();
// init the positions to make the nodes with same combo gather
self.initPos(comboMap);
// iterate
for (let i = 0; i < maxIteration; i++) {

View File

@ -493,6 +493,7 @@ const G6ForceLayout = () => {
container: container.current as string | HTMLElement,
width: 800,
height: 500,
<<<<<<< HEAD
fitView: true,
modes: {
default: ['drag-canvas', 'drag-node', 'zoom-canvas'],
@ -500,6 +501,14 @@ const G6ForceLayout = () => {
layout: {
type: 'comboForce',
linkDistance: 1000,
=======
modes: {
default: ['drag-canvas', 'drag-node'],
},
layout: {
type: 'comboForce',
linkDistance: 100,
>>>>>>> feat: layout for combo. feat: nonoverlap for combo layout in first stage.
// comboIding: true,
// comboIdGravity: 5,
// preventOverlap: true,
@ -508,11 +517,15 @@ const G6ForceLayout = () => {
nodeStrength: 30,
linkStrength: 0.1,
// preventOverlap: true,
<<<<<<< HEAD
preventComboOverlap: true,
collideStrength: 0.5,
maxIteration: 10,
comboPadding: 5,
comboSpacing: 10
=======
preventComboOverlap: true
>>>>>>> feat: layout for combo. feat: nonoverlap for combo layout in first stage.
},
defaultEdge: {
size: 3,