Skip to content

Commit

Permalink
Larger edge value has shorter length
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Aug 16, 2016
1 parent 2902ec3 commit 7195ab4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/chart/graph/forceLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ define(function (require) {
if (!zrUtil.isArray(edgeLength)) {
edgeLength = [edgeLength, edgeLength];
}
// Larger value has smaller length
edgeLength = [edgeLength[1], edgeLength[0]];

var nodes = nodeData.mapArray('value', function (value, idx) {
var point = nodeData.getItemLayout(idx);
// var w = numberUtil.linearMap(value, nodeDataExtent, [0, 50]);
Expand Down
2 changes: 1 addition & 1 deletion src/scale/Log.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ define(function (require) {
interval *= 10;
}

// Interval should not have decimal
// Interval should be integer
while (!isNaN(interval) && Math.abs(interval) < 1 && Math.abs(interval) > 0) {
interval *= 10;
}
Expand Down

0 comments on commit 7195ab4

Please sign in to comment.