未验证 提交 03bee994 编写于 作者: S sushuang 提交者: GitHub

Merge pull request #14178 from apache/release-dev

Release: 5.0.2
......@@ -88,11 +88,11 @@ function run() {
if (passFiles.length) {
if (isVerbose) {
passFiles.forEach(function (path) {
console.log(chalk.green.dim(path));
console.log(chalk.green(path));
});
}
else {
console.log(chalk.green.dim(passFiles.length + ' files. (use argument "--verbose" see details)'));
console.log(chalk.green(passFiles.length + ' files. (use argument "--verbose" see details)'));
}
}
else {
......@@ -105,7 +105,7 @@ function run() {
console.log('--------------------');
if (updatedFiles.length) {
updatedFiles.forEach(function (path) {
console.log(chalk.green.bright(path));
console.log(chalk.green(path));
});
}
else {
......@@ -118,7 +118,7 @@ function run() {
console.log('----------------');
if (pendingFiles.length) {
pendingFiles.forEach(function (path) {
console.log(chalk.red.dim(path));
console.log(chalk.red(path));
});
}
else {
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -51,7 +51,15 @@
};
BMapCoordSys.prototype.dataToPoint = function (data) {
var point = new BMap.Point(data[0], data[1]);
var point = new BMap.Point(data[0], data[1]); // TODO mercator projection is toooooooo slow
// let mercatorPoint = this._projection.lngLatToPoint(point);
// let width = this._api.getZr().getWidth();
// let height = this._api.getZr().getHeight();
// let divider = Math.pow(2, 18 - 10);
// return [
// Math.round((mercatorPoint.x - this._center.x) / divider + width / 2),
// Math.round((this._center.y - mercatorPoint.y) / divider + height / 2)
// ];
var px = this._bmap.pointToOverlayPixel(point);
......@@ -81,6 +89,7 @@
var rect = this.getViewRect();
return {
coordSys: {
// The name exposed to user is always 'cartesian2d' but not 'grid'.
type: 'bmap',
x: rect.x,
y: rect.y,
......@@ -108,7 +117,8 @@
}, this);
}
var Overlay;
var Overlay; // For deciding which dimensions to use when creating list data
BMapCoordSys.dimensions = BMapCoordSys.prototype.dimensions;
function createOverlayCtor() {
......@@ -117,11 +127,21 @@
}
Overlay.prototype = new BMap.Overlay();
/**
* 初始化
*
* @param {BMap.Map} map
* @override
*/
Overlay.prototype.initialize = function (map) {
map.getPanes().labelPane.appendChild(this._root);
return this._root;
};
/**
* @override
*/
Overlay.prototype.draw = function () {};
......@@ -130,7 +150,8 @@
BMapCoordSys.create = function (ecModel, api) {
var bmapCoordSys;
var root = api.getDom();
var root = api.getDom(); // TODO Dispose
ecModel.eachComponent('bmap', function (bmapModel) {
var painter = api.getZr().painter;
var viewportRoot = painter.getViewportRoot();
......@@ -148,28 +169,34 @@
var bmap;
if (!bmapModel.__bmap) {
// Not support IE8
var bmapRoot = root.querySelector('.ec-extension-bmap');
if (bmapRoot) {
// Reset viewport left and top, which will be changed
// in moving handler in BMapView
viewportRoot.style.left = '0px';
viewportRoot.style.top = '0px';
root.removeChild(bmapRoot);
}
bmapRoot = document.createElement('div');
bmapRoot.className = 'ec-extension-bmap';
bmapRoot.className = 'ec-extension-bmap'; // fix #13424
bmapRoot.style.cssText = 'position:absolute;width:100%;height:100%';
root.appendChild(bmapRoot);
root.appendChild(bmapRoot); // initializes bmap
var mapOptions = bmapModel.get('mapOptions');
if (mapOptions) {
mapOptions = echarts.util.clone(mapOptions);
mapOptions = echarts.util.clone(mapOptions); // Not support `mapType`, use `bmap.setMapType(MapType)` instead.
delete mapOptions.mapType;
}
bmap = bmapModel.__bmap = new BMap.Map(bmapRoot, mapOptions);
var overlay = new Overlay(viewportRoot);
bmap.addOverlay(overlay);
bmap.addOverlay(overlay); // Override
painter.getViewportRootOffset = function () {
return {
......@@ -179,7 +206,9 @@
};
}
bmap = bmapModel.__bmap;
bmap = bmapModel.__bmap; // Set bmap options
// centerAndZoom before layout and render
var center = bmapModel.get('center');
var zoom = bmapModel.get('zoom');
......@@ -214,6 +243,7 @@
echarts.extendComponentModel({
type: 'bmap',
getBMap: function () {
// __bmap is injected when creating BMapCoordSys
return this.__bmap;
},
setCenterAndZoom: function (center, zoom) {
......@@ -227,8 +257,11 @@
defaultOption: {
center: [104.114129, 37.550339],
zoom: 5,
// 2.0 http://lbsyun.baidu.com/custom/index.htm
mapStyle: {},
// 3.0 http://lbsyun.baidu.com/index.php?title=open/custom
mapStyleV2: {},
// See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
mapOptions: {},
roam: false
}
......@@ -258,7 +291,8 @@
}
var offsetEl = viewportRoot.parentNode.parentNode.parentNode;
var mapOffset = [-parseInt(offsetEl.style.left, 10) || 0, -parseInt(offsetEl.style.top, 10) || 0];
var mapOffset = [-parseInt(offsetEl.style.left, 10) || 0, -parseInt(offsetEl.style.top, 10) || 0]; // only update style when map offset changed
var viewportRootStyle = viewportRoot.style;
var offsetLeft = mapOffset[0] + 'px';
var offsetTop = mapOffset[1] + 'px';
......@@ -319,24 +353,32 @@
bmap.disableDoubleClickZoom();
bmap.disablePinchToZoom();
}
/* map 2.0 */
var originalStyle = bMapModel.__mapStyle;
var newMapStyle = bMapModel.get('mapStyle') || {};
var newMapStyle = bMapModel.get('mapStyle') || {}; // FIXME, Not use JSON methods
var mapStyleStr = JSON.stringify(newMapStyle);
if (JSON.stringify(originalStyle) !== mapStyleStr) {
// FIXME May have blank tile when dragging if setMapStyle
if (!isEmptyObject(newMapStyle)) {
bmap.setMapStyle(echarts.util.clone(newMapStyle));
}
bMapModel.__mapStyle = JSON.parse(mapStyleStr);
}
/* map 3.0 */
var originalStyle2 = bMapModel.__mapStyle2;
var newMapStyle2 = bMapModel.get('mapStyleV2') || {};
var newMapStyle2 = bMapModel.get('mapStyleV2') || {}; // FIXME, Not use JSON methods
var mapStyleStr2 = JSON.stringify(newMapStyle2);
if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
// FIXME May have blank tile when dragging if setMapStyle
if (!isEmptyObject(newMapStyle2)) {
bmap.setMapStyleV2(echarts.util.clone(newMapStyle2));
}
......@@ -348,7 +390,8 @@
}
});
echarts.registerCoordinateSystem('bmap', BMapCoordSys);
echarts.registerCoordinateSystem('bmap', BMapCoordSys); // Action
echarts.registerAction({
type: 'bmapRoam',
event: 'bmapRoam',
......
此差异已折叠。
......@@ -127,7 +127,8 @@
};
var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
var vizColorDom = getChildByTagName(nodeDom, 'viz:color');
var vizColorDom = getChildByTagName(nodeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
if (vizSizeDom) {
......@@ -136,12 +137,15 @@
if (vizPosDom) {
node.x = parseFloat(getAttr(vizPosDom, 'x'));
node.y = parseFloat(getAttr(vizPosDom, 'y'));
node.y = parseFloat(getAttr(vizPosDom, 'y')); // z
}
if (vizColorDom) {
node.itemStyle.normal.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
}
} // if (vizShapeDom) {
// node.shape = getAttr(vizShapeDom, 'shape');
// }
if (attvaluesDom) {
var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
......@@ -196,7 +200,7 @@
};
var lineStyle = edge.lineStyle.normal;
var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
var vizColorDom = getChildByTagName(edgeDom, 'viz:color');
var vizColorDom = getChildByTagName(edgeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
if (vizThicknessDom) {
lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
......@@ -204,7 +208,10 @@
if (vizColorDom) {
lineStyle.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
}
} // if (vizShapeDom) {
// edge.shape = vizShapeDom.getAttribute('shape');
// }
return edge;
}) : [];
......@@ -272,6 +279,24 @@
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function asc(arr) {
arr.sort(function (a, b) {
return a - b;
......@@ -286,6 +311,33 @@
var e = H - h;
return e ? v + e * (ascArr[h] - v) : v;
}
/**
* See:
* <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
* <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>
*
* Helper method for preparing data.
*
* @param {Array.<number>} rawData like
* [
* [12,232,443], (raw data set for the first box)
* [3843,5545,1232], (raw data set for the second box)
* ...
* ]
* @param {Object} [opt]
*
* @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier.
* default 1.5, means Q1 - 1.5 * (Q3 - Q1).
* If 'none'/0 passed, min bound will not be used.
* @param {(number|string)} [opt.layout='horizontal']
* Box plot layout, can be 'horizontal' or 'vertical'
* @return {Object} {
* boxData: Array.<Array.<number>>
* outliers: Array.<Array.<number>>
* axisData: Array.<string>
* }
*/
function prepareBoxplotData (rawData, opt) {
opt = opt || {};
......@@ -327,11 +379,15 @@
}
var version = '1.0.0';
// For backward compatibility, where the namespace `dataTool` will
// be mounted on `echarts` is the extension `dataTool` is imported.
// But the old version of echarts do not have `dataTool` namespace,
// so check it before mounting.
if (echarts.dataTool) {
echarts.dataTool.version = version;
echarts.dataTool.gexf = gexf;
echarts.dataTool.prepareBoxplotData = prepareBoxplotData;
echarts.dataTool.prepareBoxplotData = prepareBoxplotData; // echarts.dataTool.boxplotTransform = boxplotTransform;
}
exports.gexf = gexf;
......
此差异已折叠。
{
"name": "echarts",
"version": "5.0.1",
"version": "5.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -9771,9 +9771,9 @@
}
},
"zrender": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.3.tgz",
"integrity": "sha512-TVcN2IMdo7je3GEq/E4CER4AGBe/n50/izILdupppyHf/hVHuiXCRliqdu8+32Z1OmGg6RfKt5qQlkX+bOtU0g==",
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.4.tgz",
"integrity": "sha512-DJpy0yrHYY5CuH6vhb9IINWbjvBUe/56J8aH86Jb7O8rRPAYZ3M2E469Qf5B3EOIfM3o3aUrO5edRQfLJ+l1Qw==",
"requires": {
"tslib": "2.0.3"
}
......
{
"name": "echarts",
"version": "5.0.1",
"version": "5.0.2",
"description": "Apache ECharts is a powerful, interactive charting and data visualization library for browser",
"license": "Apache-2.0",
"keywords": [
......@@ -64,7 +64,7 @@
},
"dependencies": {
"tslib": "2.0.3",
"zrender": "5.0.3"
"zrender": "5.0.4"
},
"devDependencies": {
"@babel/code-frame": "7.10.4",
......
......@@ -120,10 +120,10 @@ const indexOf = zrUtil.indexOf;
const hasWindow = typeof window !== 'undefined';
export const version = '5.0.1';
export const version = '5.0.2';
export const dependencies = {
zrender: '5.0.3'
zrender: '5.0.4'
};
const TEST_FRAME_REMAIN_TIME = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册