Browse Source

fixed little bug in layoutengine

flowchartTest
Alex de Mulder 9 years ago
parent
commit
d61dd8d887
2 changed files with 4788 additions and 4738 deletions
  1. +4783
    -4735
      dist/vis.js
  2. +5
    -3
      lib/network/modules/LayoutEngine.js

+ 4783
- 4735
dist/vis.js
File diff suppressed because it is too large
View File


+ 5
- 3
lib/network/modules/LayoutEngine.js View File

@ -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';
}

Loading…
Cancel
Save