Skip to content

Commit

Permalink
fix simulation distance
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-beef committed Jan 19, 2019
1 parent 6847e4a commit 60590c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/util/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ge.defaultSimulation = function defaultSimulation(simulation, nodes, links) {
.force('center', d3.forceCenter());
}

var dist = 10 * d3.max(nodes, function(d) {
var dist = 2 * d3.max(nodes, function(d) {
return Math.max(d.width, d.height);
});

Expand Down Expand Up @@ -117,6 +117,9 @@ ge._extend = function _extend(dst, src) {
if(Array.isArray(value)) {
dst[key] = value.slice();
}
else if(value.constructor.name !== 'Object') {
dst[key] = value;
}
else {
var dstValue = dst[key];
if(!dstValue
Expand Down

0 comments on commit 60590c4

Please sign in to comment.