提交 348cce37 编写于 作者: 1 100pah 提交者: sushuang

fix: tweak some code style.

上级 f2927d31
......@@ -459,29 +459,28 @@ var ScrollableLegendView = LegendView.extend({
},
_findTargetItemIndex: function (targetDataIndex) {
if (!this._showController) {
return 0;
}
var index;
var contentGroup = this.getContentGroup();
var defaultIndex;
if (this._showController) {
contentGroup.eachChild(function (child, idx) {
var legendDataIdx = child.__legendDataIndex;
// FIXME
// If the given targetDataIndex (from model) is illegal,
// we use defualtIndex. But the index on the legend model and
// action payload is still illegal. That case will not be
// changed until some scenario requires.
if (defaultIndex == null && legendDataIdx != null) {
defaultIndex = idx;
}
if (legendDataIdx === targetDataIndex) {
index = idx;
}
});
}
else {
return 0;
}
contentGroup.eachChild(function (child, idx) {
var legendDataIdx = child.__legendDataIndex;
// FIXME
// If the given targetDataIndex (from model) is illegal,
// we use defualtIndex. But the index on the legend model and
// action payload is still illegal. That case will not be
// changed until some scenario requires.
if (defaultIndex == null && legendDataIdx != null) {
defaultIndex = idx;
}
if (legendDataIdx === targetDataIndex) {
index = idx;
}
});
return index != null ? index : defaultIndex;
}
......
......@@ -78,7 +78,7 @@ function markerTypeCalculatorWithExtent(
coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision);
}
return [coordArr,coordArrValue];
return [coordArr, coordArrValue];
}
var curry = zrUtil.curry;
......@@ -146,8 +146,8 @@ export function dataTransform(seriesModel, item) {
otherCoordIndex, targetCoordIndex
);
item.coord = coordInfo[0]
// Force to use the value of calculated value.
// let item use the value without stack.
// Force to use the value of calculated value.
// let item use the value without stack.
item.value = coordInfo[1]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册