Skip to content

Commit

Permalink
fix(tree): code rebuild follow the review suggest apache#3
Browse files Browse the repository at this point in the history
  • Loading branch information
wf123537200 committed Jun 12, 2020
1 parent 68eff58 commit eadceff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/chart/graph/circularLayoutHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export function circularLayout(seriesModel, basedOn) {

graph.eachEdge(function (edge, index) {
var curveness = zrUtil.retrieve3(
edge.getModel().get('lineStyle.curveness') || null,
getCurvenessForEdge(edge, seriesModel, index),
edge.getModel().get('lineStyle.curveness'),
0
);
var p1 = vec2.clone(edge.node1.getLayout());
Expand Down
6 changes: 4 additions & 2 deletions src/chart/helper/multipleGraphEdgeHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

import * as zrUtil from 'zrender/src/core/util';

var KEY_DELIMITER = '-->';
/**
* params handler
Expand All @@ -42,7 +44,7 @@ var createCurveness = function (seriesModel, appendLength) {
if (typeof autoCurvenessParmas === 'number') {
length = autoCurvenessParmas;
}
else if (Object.prototype.toString.call(autoCurvenessParmas) === '[object Array]') {
else if (zrUtil.isArray(autoCurvenessParmas)) {
seriesModel._curvenessList = autoCurvenessParmas;
return;
}
Expand Down Expand Up @@ -178,7 +180,7 @@ export function createEdgeMapForCurveness(n1, n2, seriesModel, dataIndex) {
*/
export function getCurvenessForEdge(edge, seriesModel, index, needReverse) {
const autoCurvenessParams = getAutoCurvenessParams(seriesModel);
const isArrayParam = Object.prototype.toString.call(autoCurvenessParams) === '[object Array]';
const isArrayParam = zrUtil.isArray(autoCurvenessParams);
if (!autoCurvenessParams) {
return null;
}
Expand Down

0 comments on commit eadceff

Please sign in to comment.