Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Jun 19, 2016
1 parent 5941aa4 commit b87fcd0
Show file tree
Hide file tree
Showing 31 changed files with 17,831 additions and 9,963 deletions.
7,611 changes: 5,171 additions & 2,440 deletions dist/echarts.common.js

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions dist/echarts.common.min.js

Large diffs are not rendered by default.

10,314 changes: 6,687 additions & 3,627 deletions dist/echarts.js

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions dist/echarts.min.js

Large diffs are not rendered by default.

8,583 changes: 5,178 additions & 3,405 deletions dist/echarts.simple.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions dist/echarts.simple.min.js

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions dist/extension/bmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,10 @@ return /******/ (function(modules) { // webpackBootstrap
},

defaultOption: {
center: null,

zoom: 1,
center: [104.114129, 37.550339],

zoom: 5,

mapStyle: {},

Expand Down Expand Up @@ -349,7 +350,10 @@ return /******/ (function(modules) { // webpackBootstrap
// FIXME, Not use JSON methods
var mapStyleStr = JSON.stringify(newMapStyle);
if (JSON.stringify(originalStyle) !== mapStyleStr) {
bmap.setMapStyle(newMapStyle);
// FIXME May have blank tile when dragging if setMapStyle
if (Object.keys(newMapStyle).length) {
bmap.setMapStyle(newMapStyle);
}
bMapModel.__mapStyle = JSON.parse(mapStyleStr);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/extension/bmap.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@
"zrender": "^3.1.0"
},
"devDependencies": {
"zrender": "^3.1.0",
"coordtransform": "^2.0.2",
"escodegen": "^1.8.0",
"esprima": "^2.7.2",
"estraverse": "^4.1.1",
"fs-extra": "^0.26.5",
"glob": "^7.0.0",
"webpack": "^1.12.13"
"webpack": "^1.12.13",
"zrender": "^3.1.0"
}
}
9 changes: 9 additions & 0 deletions src/chart/helper/EffectLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ define(function (require) {
}
var color = effectModel.get('color') || lineData.getItemVisual(idx, 'color');
var symbol = this.childAt(1);

var period = effectModel.get('period') * 1000;
var loop = effectModel.get('loop');
if (
this._symbolType !== symbolType
|| period !== this._period
|| loop !== this._loop
) {
// Remove previous
this.remove(symbol);

symbol = symbolUtil.createSymbol(
symbolType, -0.5, -0.5, 1, 1, color
);
Expand All @@ -98,6 +102,11 @@ define(function (require) {
}
animator.start();
}
// Symbol may be removed if loop is false
if (!symbol) {
return;
}

// Shadow color is same with color in default
symbol.setStyle('shadowColor', color);
symbol.setStyle(effectModel.getItemStyle(['color']));
Expand Down
1 change: 1 addition & 0 deletions src/util/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ define(function(require) {
? NaN : +value; // If string (like '-'), using '+' parse to NaN
};

// PENDING A little ugly
modelUtil.dataFormatMixin = {
/**
* Get params for formatter
Expand Down
35 changes: 18 additions & 17 deletions src/util/quickSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,28 @@ define(function (require) {
return a - b;
}

function swapElement(list, idx0, idx1) {
var tmp = list[idx0];
list[idx0] = list[idx1];
list[idx1] = tmp;
function swapElement(arr, idx0, idx1) {
var tmp = arr[idx0];
arr[idx0] = arr[idx1];
arr[idx1] = tmp;
}

function select(list, left, right, nth, compareFunc) {
function select(arr, left, right, nth, compareFunc) {
var pivotIdx = left;
var pivotValue;
while (right > left) {
pivotIdx = Math.round((right + left) / 2);
var pivotValue = list[pivotIdx];
pivotValue = arr[pivotIdx];
// Swap pivot to the end
swapElement(list, pivotIdx, right);
swapElement(arr, pivotIdx, right);
pivotIdx = left;
for (var i = left; i <= right - 1; i++) {
if (compareFunc(pivotValue, list[i]) >= 0) {
swapElement(list, i, pivotIdx);
if (compareFunc(pivotValue, arr[i]) >= 0) {
swapElement(arr, i, pivotIdx);
pivotIdx++;
}
}
swapElement(list, right, pivotIdx);
swapElement(arr, right, pivotIdx);

if (pivotIdx === nth) {
return pivotIdx;
Expand All @@ -50,20 +51,20 @@ define(function (require) {

/**
* @alias module:echarts/core/quickSelect
* @param {Array} list
* @param {Array} arr
* @param {number} [left]
* @param {number} [right]
* @param {number} nth
* @param {Function} [compareFunc]
* @example
* var quickSelect = require('echarts/core/quickSelect');
* var list = [5, 2, 1, 4, 3]
* quickSelect(list, 3);
* quickSelect(list, 0, 3, 1, function (a, b) {return a - b});
* var arr = [5, 2, 1, 4, 3]
* quickSelect(arr, 3);
* quickSelect(arr, 0, 3, 1, function (a, b) {return a - b});
*
* @return {number}
*/
function quickSelect(list, left, right, nth, compareFunc) {
function quickSelect(arr, left, right, nth, compareFunc) {
if (arguments.length <= 3) {
nth = left;
if (arguments.length == 2) {
Expand All @@ -73,9 +74,9 @@ define(function (require) {
compareFunc = right;
}
left = 0;
right = list.length - 1;
right = arr.length - 1;
}
return select(list, left, right, nth, compareFunc);
return select(arr, left, right, nth, compareFunc);
}

return quickSelect;
Expand Down
5 changes: 4 additions & 1 deletion test/area.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<meta charset="utf-8">
<script src="esl.js"></script>
<script src="http://requirejs.org/docs/release/2.2.0/minified/require.js"></script>
<script src="config.js"></script>
<meta name="viewport" content="user-scalable=no,width=device-width,height=device-height">
</head>
Expand Down Expand Up @@ -87,6 +87,9 @@
},
tooltip: {
trigger: 'axis',
position: function (point) {
return [point[0], '10%'];
},
axisPointer: {
type: 'line'
}
Expand Down
2 changes: 2 additions & 0 deletions test/bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

var itemStyle = {
normal: {
barBorderRadius: 5,
label: {
show: true,
position: 'outside'
Expand All @@ -68,6 +69,7 @@
chart.setOption({
backgroundColor: '#eee',
legend: {
inactiveColor: '#abc',
borderWidth: 1,
data: [{
name: 'bar'
Expand Down
Loading

0 comments on commit b87fcd0

Please sign in to comment.