|
|
@ -1,3 +1,5 @@ |
|
|
|
'use strict' |
|
|
|
|
|
|
|
var util = require('../../util'); |
|
|
|
|
|
|
|
class LayoutEngine { |
|
|
@ -78,14 +80,14 @@ class LayoutEngine { |
|
|
|
allOptions.physics = {solver: 'hierarchicalRepulsion'}; |
|
|
|
this.optionsBackup.physics = {solver:'barnesHut'}; |
|
|
|
} |
|
|
|
else if (typeof options.physics === 'object') { |
|
|
|
else if (typeof allOptions.physics === 'object') { |
|
|
|
this.optionsBackup.physics = {solver:'barnesHut'}; |
|
|
|
if (options.physics.solver !== undefined) { |
|
|
|
if (allOptions.physics.solver !== undefined) { |
|
|
|
this.optionsBackup.physics = {solver:options.physics.solver}; |
|
|
|
} |
|
|
|
allOptions.physics['solver'] = 'hierarchicalRepulsion'; |
|
|
|
} |
|
|
|
else if (options.physics !== false) { |
|
|
|
else if (allOptions.physics !== false) { |
|
|
|
this.optionsBackup.physics = {solver:'barnesHut'}; |
|
|
|
allOptions.physics['solver'] = 'hierarchicalRepulsion'; |
|
|
|
} |
|
|
|