File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
marklogic-data-hub-central/ui/src/components/modeling/graph-view/graph-vis Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -69,14 +69,18 @@ const GraphVis: React.FC<Props> = (props) => {
6969
7070 const coordinatesExist = ( ) => {
7171 let coordsExist = true ;
72+ let newNodeCounter = 0 ;
7273 if ( entitiesConfigExist ( props . hubCentralConfig ) ) {
7374 let allEntityCoordinates = props . hubCentralConfig [ "modeling" ] [ "entities" ] ;
7475 for ( const entity of props . entityTypes ) {
7576 if ( ! allEntityCoordinates [ entity . entityName ] ) {
76- coordsExist = false ;
77- break ;
77+ //count number of new nodes, if they only added one, no need for physics to stabilize entire graph on line 184
78+ newNodeCounter = newNodeCounter + 1 ;
7879 }
7980 }
81+ if ( newNodeCounter > 2 ) {
82+ coordsExist = false ;
83+ }
8084 } else {
8185 coordsExist = false ;
8286 }
@@ -642,7 +646,7 @@ const GraphVis: React.FC<Props> = (props) => {
642646 physics : {
643647 enabled : physicsEnabled ,
644648 barnesHut : {
645- springLength : 160 ,
649+ springLength : 200 ,
646650 springConstant : 1 ,
647651 avoidOverlap : 1
648652 } ,
You can’t perform that action at this time.
0 commit comments