You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2019/02/18 09:13:46 UTC
[incubator-echarts] branch fix/release-license updated: Fix license
statement.
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch fix/release-license
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/fix/release-license by this push:
new 7e56a54 Fix license statement.
7e56a54 is described below
commit 7e56a540612e7279d22034e61e0c0bec239cef40
Author: sushuang <su...@gmail.com>
AuthorDate: Mon Feb 18 17:12:54 2019 +0800
Fix license statement.
---
LICENSE | 2 +-
src/chart/graph/forceHelper.js | 39 ++++++++++++++++----------------------
src/chart/treemap/treemapLayout.js | 15 ++++++++-------
src/scale/Time.js | 10 +++++-----
src/util/number.js | 6 +++---
5 files changed, 33 insertions(+), 39 deletions(-)
diff --git a/LICENSE b/LICENSE
index 9a0283d..d9baea3 100644
--- a/LICENSE
+++ b/LICENSE
@@ -210,7 +210,7 @@ Apache ECharts Subcomponents:
The Apache ECharts project contains subcomponents with separate copyright
notices and license terms. Your use of the source code for these
-subcomponents is subject to the terms and conditions of the following
+subcomponents is also subject to the terms and conditions of the following
licenses.
BSD 3-Clause (d3.js):
diff --git a/src/chart/graph/forceHelper.js b/src/chart/graph/forceHelper.js
index baa6f4e..0dffd9a 100644
--- a/src/chart/graph/forceHelper.js
+++ b/src/chart/graph/forceHelper.js
@@ -18,9 +18,12 @@
*/
/*
-* The layout implementation references to d3.js. The use of
-* the source code of this file is also subject to the terms
-* and consitions of its license (BSD-3Clause, see
+* A third-party license is embeded for some of the code in this file:
+* Some formulas were originally copied from "d3.js" with some
+* modifications made for this project.
+* (See more details in the comment of the method "step" below.)
+* The use of the source code of this file is also subject to the terms
+* and consitions of the license of "d3.js" (BSD-3Clause, see
* <echarts/src/licenses/LICENSE-d3>).
*/
@@ -53,26 +56,10 @@ export function forceLayout(nodes, edges, opts) {
for (var i = 0; i < nodes.length; i++) {
var n = nodes[i];
if (!n.p) {
- // Use the position from first adjecent node with defined position
- // Or use a random position
- // From d3
- // if (n.edges) {
- // var j = -1;
- // while (++j < n.edges.length) {
- // var e = n.edges[j];
- // var other = adjacentNode(n, e);
- // if (other.p) {
- // n.p = vec2.clone(other.p);
- // break;
- // }
- // }
- // }
- // if (!n.p) {
- n.p = vec2.create(
- width * (Math.random() - 0.5) + center[0],
- height * (Math.random() - 0.5) + center[1]
- );
- // }
+ n.p = vec2.create(
+ width * (Math.random() - 0.5) + center[0],
+ height * (Math.random() - 0.5) + center[1]
+ );
}
n.pp = vec2.clone(n.p);
n.edges = null;
@@ -97,6 +84,12 @@ export function forceLayout(nodes, edges, opts) {
nodes[idx].fixed = false;
},
+ /**
+ * Some formulas were originally copied from "d3.js"
+ * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
+ * with some modifications made for this project.
+ * See the license statement at the head of this file.
+ */
step: function (cb) {
var v12 = [];
var nLen = nodes.length;
diff --git a/src/chart/treemap/treemapLayout.js b/src/chart/treemap/treemapLayout.js
index 4114fd6..da35e17 100644
--- a/src/chart/treemap/treemapLayout.js
+++ b/src/chart/treemap/treemapLayout.js
@@ -18,9 +18,9 @@
*/
/*
-* A third-party license is included for some of the code in this file:
-* The treemap layout implementation is originally copied from
-* "d3.js" and made many modifications for this project.
+* A third-party license is embeded for some of the code in this file:
+* The treemap layout implementation was originally copied from
+* "d3.js" with some modifications made for this project.
* (See more details in the comment of the method "squarify" below.)
* The use of the source code of this file is also subject to the terms
* and consitions of the license of "d3.js" (BSD-3Clause, see
@@ -152,12 +152,13 @@ export default {
};
/**
- * Layout treemap with squarify algorithm. The original presentation of this algorithm
- * is made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
+ * Layout treemap with squarify algorithm.
+ * The original presentation of this algorithm
+ * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
* <https://graphics.ethz.ch/teaching/scivis_common/Literature/squarifiedTreeMaps.pdf>.
- * The implementation of this algorithm is originally copied from "d3.js"
+ * The implementation of this algorithm was originally copied from "d3.js"
* <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/layout/treemap.js>
- * and made many modifications for this program.
+ * with some modifications made for this program.
* See the license statement at the head of this file.
*
* @protected
diff --git a/src/scale/Time.js b/src/scale/Time.js
index c8a647b..36b5cfd 100644
--- a/src/scale/Time.js
+++ b/src/scale/Time.js
@@ -18,9 +18,9 @@
*/
/*
-* A third-party license is included for some of the code in this file:
-* The "scaleLevels" is originally copied from "d3.js" and made some
-* modifications for this project.
+* A third-party license is embeded for some of the code in this file:
+* The "scaleLevels" was originally copied from "d3.js" with some
+* modifications made for this project.
* (See more details in the comment on the definition of "scaleLevels" below.)
* The use of the source code of this file is also subject to the terms
* and consitions of the license of "d3.js" (BSD-3Clause, see
@@ -177,9 +177,9 @@ zrUtil.each(['contain', 'normalize'], function (methodName) {
});
/**
- * This implementation is originally copied from "d3.js"
+ * This implementation was originally copied from "d3.js"
* <https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/time/scale.js>
- * and made some modifications for this program.
+ * with some modifications made for this program.
* See the license statement at the head of this file.
*/
var scaleLevels = [
diff --git a/src/util/number.js b/src/util/number.js
index f271aa7..e10f876 100644
--- a/src/util/number.js
+++ b/src/util/number.js
@@ -18,8 +18,8 @@
*/
/*
-* A third-party license is included for some of the code in this file:
-* The method "quantile" copied from "d3.js".
+* A third-party license is embeded for some of the code in this file:
+* The method "quantile" was copied from "d3.js".
* (See more details in the comment of the method below.)
* The use of the source code of this file is also subject to the terms
* and consitions of the license of "d3.js" (BSD-3Clause, see
@@ -441,7 +441,7 @@ export function nice(val, round) {
}
/**
- * This code is copied from "d3.js"
+ * This code was copied from "d3.js"
* <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/arrays/quantile.js>.
* See the license statement at the head of this file.
* @param {Array.<number>} ascArr
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org