Skip to content

Commit eeb3c82

Browse files
committed
代码规范
添加地图数据忽略jshint检查
1 parent 6740cac commit eeb3c82

File tree

10 files changed

+436
-455
lines changed

10 files changed

+436
-455
lines changed

.jshintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/util/mapData/china/*
2+
src/util/mapData/rawData/china/*

src/chart/bar.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ define(function(require) {
611611

612612
/**
613613
* 构造函数默认执行的初始化方法,也用于创建实例后动态修改
614-
* @param {Object} newZr
615614
* @param {Object} newSeries
616615
* @param {Object} newComponent
617616
*/
@@ -647,7 +646,6 @@ define(function(require) {
647646
var serie;
648647
var seriesIndex;
649648
var dataIndex;
650-
var categoryAxis;
651649
for (var i = self.shapeList.length - 1; i >= 0; i--) {
652650
seriesIndex = ecData.get(self.shapeList[i], 'seriesIndex');
653651
if (aniMap[seriesIndex] && !aniMap[seriesIndex][3]) {
@@ -663,7 +661,7 @@ define(function(require) {
663661
zr.delShape(self.shapeList[i].id);
664662
continue;
665663
}
666-
else if (!aniMap[seriesIndex][2] && dataIndex == 0) {
664+
else if (!aniMap[seriesIndex][2] && dataIndex === 0) {
667665
// 队尾加入删除头部
668666
zr.delShape(self.shapeList[i].id);
669667
continue;

src/chart/k.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ define(function(require) {
370370

371371
/**
372372
* 构造函数默认执行的初始化方法,也用于创建实例后动态修改
373-
* @param {Object} newZr
374373
* @param {Object} newSeries
375374
* @param {Object} newComponent
376375
*/
@@ -402,11 +401,9 @@ define(function(require) {
402401
var x;
403402
var dx;
404403
var y;
405-
var dy;
406404
var serie;
407405
var seriesIndex;
408406
var dataIndex;
409-
var categoryAxis;
410407
for (var i = 0, l = self.shapeList.length; i < l; i++) {
411408
seriesIndex = self.shapeList[i]._seriesIndex;
412409
if (aniMap[seriesIndex] && !aniMap[seriesIndex][3]) {
@@ -421,7 +418,7 @@ define(function(require) {
421418
zr.delShape(self.shapeList[i].id);
422419
continue;
423420
}
424-
else if (!aniMap[seriesIndex][2] && dataIndex == 0) {
421+
else if (!aniMap[seriesIndex][2] && dataIndex === 0) {
425422
// 队尾加入删除头部
426423
zr.delShape(self.shapeList[i].id);
427424
continue;

src/chart/line.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ define(function(require) {
703703

704704
/**
705705
* 构造函数默认执行的初始化方法,也用于创建实例后动态修改
706-
* @param {Object} newZr
707706
* @param {Object} newSeries
708707
* @param {Object} newComponent
709708
*/
@@ -736,7 +735,6 @@ define(function(require) {
736735
var dx;
737736
var y;
738737
var dy;
739-
var serie;
740738
var seriesIndex;
741739
var pointList;
742740
var isHorizontal; // 是否横向布局, isHorizontal;
@@ -806,7 +804,7 @@ define(function(require) {
806804
continue;
807805
}
808806
else if (!aniMap[seriesIndex][2]
809-
&& self.shapeList[i]._dataIndex == 0
807+
&& self.shapeList[i]._dataIndex === 0
810808
) {
811809
// 队尾加入删除头部
812810
zr.delShape(self.shapeList[i].id);

src/chart/map.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ define(function(require) {
150150
}
151151
zr.refresh();
152152
}
153-
}
153+
};
154154
}
155155

156156
/**
@@ -842,7 +842,6 @@ define(function(require) {
842842

843843
/**
844844
* 构造函数默认执行的初始化方法,也用于创建实例后动态修改
845-
* @param {Object} newZr
846845
* @param {Object} newSeries
847846
* @param {Object} newComponent
848847
*/

src/chart/pie.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,6 @@ define(function(require) {
640640

641641
/**
642642
* 构造函数默认执行的初始化方法,也用于创建实例后动态修改
643-
* @param {Object} newZr
644643
* @param {Object} newSeries
645644
* @param {Object} newComponent
646645
*/
@@ -838,8 +837,8 @@ define(function(require) {
838837
.when(
839838
400,
840839
{
841-
xStart :targeSector.style.xStart,
842-
yStart :targeSector.style.yStart,
840+
xStart:targeSector.style.xStart,
841+
yStart:targeSector.style.yStart,
843842
xEnd : targeSector.style.xEnd,
844843
yEnd : targeSector.style.yEnd
845844
}

0 commit comments

Comments
 (0)