Skip to content

Commit

Permalink
Merge pull request apache#6006 from zhuangzhuang/master
Browse files Browse the repository at this point in the history
fix some doc bugs.
  • Loading branch information
100pah authored Jun 27, 2017
2 parents 34e41df + ec8bb16 commit da8cbbe
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/chart/bar/PictorialBarView.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ define(function (require) {
path.__pictorialRepeatTimes = repeatTimes;
bundle.add(path);

var target = makeTarget(index, true);
var target = makeTarget(index);

updateAttr(
path,
Expand Down
4 changes: 2 additions & 2 deletions src/chart/chord/chordCircularLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ define(function (require) {
if (opts.sort && opts.sort != 'none') {
groups.sort(compareGroups);
if (opts.sort === 'descending') {
groups.revert();
groups.reverse();
}
}

Expand All @@ -58,7 +58,7 @@ define(function (require) {
if (opts.sortSub && opts.sortSub != 'none') {
group.subGroups.sort(compareGroups);
if (opts.sortSub === 'descending') {
group.subGroups.revert();
group.subGroups.reverse();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/chart/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ define(function (require) {

/**
* @public
* @param {nubmer|string} dim
* @param {number|string} dim
* @param {number} [dataIndexInside=currDataIndexInside]
* @return {number|string} value
*/
Expand Down
2 changes: 1 addition & 1 deletion src/chart/helper/EffectSymbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ define(function (require) {

// Must reinitialize effect if following configuration changed
var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale'];
for (var i = 0; i < DIFFICULT_PROPS; i++) {
for (var i = 0; i < DIFFICULT_PROPS.length; i++) {
var propName = DIFFICULT_PROPS[i];
if (oldEffectCfg[propName] !== effectCfg[propName]) {
this.stopEffectAnimation();
Expand Down
2 changes: 1 addition & 1 deletion src/chart/sankey/sankeyLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ define(function (require) {
* @param {module:echarts/data/Graph~Node} nodes node of sankey view
* @param {module:echarts/data/Graph~Edge} edges edge of sankey view
* @param {number} height the whole height of the area to draw the view
* @param {numbber} nodeGap the vertical distance between two nodes
* @param {number} nodeGap the vertical distance between two nodes
* in the same column.
* @param {number} iterations the number of iterations for the algorithm
*/
Expand Down
2 changes: 1 addition & 1 deletion src/chart/themeRiver/themeRiverLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ define(function (require) {
* Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics
*
* @param {Array.<Array>} data the points in each layer
* @return {Array}
* @return {Object}
*/
function computeBaseline(data) {
var layerNum = data.length;
Expand Down
3 changes: 2 additions & 1 deletion src/component/axisPointer/BaseAxisPointer.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ define(function(require) {
if (zrUtil.isObject(lastProps) && zrUtil.isObject(newProps)) {
var equals = true;
zrUtil.each(newProps, function (item, key) {
equals &= propsEqual(lastProps[key], item);
// ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators
equals = equals && propsEqual(lastProps[key], item);
});
return !!equals;
}
Expand Down
2 changes: 1 addition & 1 deletion src/component/helper/BrushTargetManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ define(function(require) {
*
* @param {Object} area
* @param {Array} targetInfoList
* @return {Obejct|boolean}
* @return {Object|boolean}
*/
proto.findTargetInfo = function (area, ecModel) {
var targetInfoList = this._targetInfoList;
Expand Down
4 changes: 2 additions & 2 deletions src/component/toolbox/feature/DataView.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ define(function (require) {

/**
* @param {module:echarts/model/Global}
* @return {string}
* @return {Object}
* @inner
*/
function getContentFromModel(ecModel) {
Expand Down Expand Up @@ -157,7 +157,7 @@ define(function (require) {
var itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');
/**
* @param {string} tsv
* @return {Array.<Object>}
* @return {Object}
*/
function parseTSVContents(tsv) {
var tsvLines = tsv.split(/\n+/g);
Expand Down
2 changes: 1 addition & 1 deletion src/component/tooltip/TooltipView.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ define(function (require) {
},

/**
* @param {string|Function|Array.<number>} positionExpr
* @param {string|Function|Array.<number>|Object} positionExpr
* @param {number} x Mouse x
* @param {number} y Mouse y
* @param {boolean} confine Whether confine tooltip content in view rect.
Expand Down
2 changes: 1 addition & 1 deletion src/coord/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ define(function (require) {
/**
* Convert a (x, y) point to time date
*
* @param {string} point point
* @param {Array} point point
* @return {Object} date
*/
pointToDate: function (point) {
Expand Down
2 changes: 1 addition & 1 deletion src/coord/cartesian/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ define(function(require, factory) {

/**
* @param {string} axisType
* @param {ndumber} [axisIndex]
* @param {number} [axisIndex]
*/
gridProto.getAxis = function (axisType, axisIndex) {
var axesMapOnDim = this._axesMap[axisType];
Expand Down
2 changes: 1 addition & 1 deletion src/data/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ define(function (require) {

/**
* Set layout property.
* @param {string} key
* @param {string|Object} key
* @param {*} [val]
*/
listProto.setLayout = function (key, val) {
Expand Down
2 changes: 1 addition & 1 deletion src/data/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ define(function(require) {
* }
*
* @static
* @param {Objec} dataRoot Root node.
* @param {Object} dataRoot Root node.
* @param {module:echarts/model/Model} hostModel
* @param {Array.<Object>} levelOptions
* @return module:echarts/data/Tree
Expand Down
8 changes: 4 additions & 4 deletions src/echarts.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ define(function (require) {
*/
this.group;
/**
* @type {HTMLDomElement}
* @type {HTMLElement}
* @private
*/
this._dom = dom;
Expand Down Expand Up @@ -228,7 +228,7 @@ define(function (require) {
}
};
/**
* @return {HTMLDomElement}
* @return {HTMLElement}
*/
echartsProto.getDom = function () {
return this._dom;
Expand Down Expand Up @@ -1564,7 +1564,7 @@ define(function (require) {
}

/**
* @param {HTMLDomElement} dom
* @param {HTMLElement} dom
* @param {Object} [theme]
* @param {Object} opts
* @param {number} [opts.devicePixelRatio] Use window.devicePixelRatio by default
Expand Down Expand Up @@ -1681,7 +1681,7 @@ define(function (require) {
};

/**
* @param {HTMLDomElement} dom
* @param {HTMLElement} dom
* @return {echarts~ECharts}
*/
echarts.getInstanceByDom = function (dom) {
Expand Down
6 changes: 3 additions & 3 deletions src/util/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ define(function (require) {
* [4, 3, 2] => [4, 3, 2, 3]
* @param {number|Array.<number>} val
*/
formatUtil.normalizeCssArray = function (val) {
var len = val.length;
formatUtil.normalizeCssArray = function (val) {
if (typeof (val) === 'number') {
return [val, val, val, val];
}
else if (len === 2) {
var len = val.length;
if (len === 2) {
// vertical | horizontal
return [val[0], val[1], val[0], val[1]];
}
Expand Down
2 changes: 1 addition & 1 deletion src/visual/VisualMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ define(function (require) {
/**
* @public
* @param {Object} obj
* @return {Oject} new object containers visual values.
* @return {Object} new object containers visual values.
* If no visuals, return null.
*/
VisualMapping.retrieveVisuals = function (obj) {
Expand Down
4 changes: 2 additions & 2 deletions test/chord.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
], function (echarts) {

var chart = echarts.init(document.getElementById('main'));
chart.setOption({
chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
Expand All @@ -36,7 +36,7 @@
series: [{
name: 'chord',
type: 'chord',
sort: 'ascending',
sort: 'descending',
data : [
{name : 'group1'},
{name : 'group2'},
Expand Down

0 comments on commit da8cbbe

Please sign in to comment.