提交 7cde5466 编写于 作者: 1 100pah

release: 5.0.0-alpha.2

上级 abc421bb
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -318,7 +318,10 @@
coordSys.setMapOffset(mapOffset);
bMapModel.__mapOffset = mapOffset;
api.dispatchAction({
type: 'bmapRoam'
type: 'bmapRoam',
animation: {
duration: 0
}
});
};
......@@ -328,7 +331,10 @@
}
api.dispatchAction({
type: 'bmapRoam'
type: 'bmapRoam',
animation: {
duration: 0
}
});
}
......
此差异已折叠。
......@@ -19,4 +19,4 @@
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],e):e((t=t||self).bmap={},t.echarts)}(this,function(t,e){"use strict";function d(t,e){this._bmap=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=e,this._projection=new BMap.MercatorProjection}function o(i,a){return a=a||[0,0],e.util.map([0,1],function(t){var e=a[t],o=i[t]/2,n=[],r=[];return n[t]=e-o,r[t]=e+o,n[1-t]=r[1-t]=a[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(r)[t])},this)}var y;d.prototype.dimensions=["lng","lat"],d.prototype.setZoom=function(t){this._zoom=t},d.prototype.setCenter=function(t){this._center=this._projection.lngLatToPoint(new BMap.Point(t[0],t[1]))},d.prototype.setMapOffset=function(t){this._mapOffset=t},d.prototype.getBMap=function(){return this._bmap},d.prototype.dataToPoint=function(t){var e=new BMap.Point(t[0],t[1]),o=this._bmap.pointToOverlayPixel(e),n=this._mapOffset;return[o.x-n[0],o.y-n[1]]},d.prototype.pointToData=function(t){var e=this._mapOffset;return[(t=this._bmap.overlayPixelToPoint({x:t[0]+e[0],y:t[1]+e[1]})).lng,t.lat]},d.prototype.getViewRect=function(){var t=this._api;return new e.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},d.prototype.getRoamTransform=function(){return e.matrix.create()},d.prototype.prepareCustoms=function(){var t=this.getViewRect();return{coordSys:{type:"bmap",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:e.util.bind(this.dataToPoint,this),size:e.util.bind(o,this)}}},d.dimensions=d.prototype.dimensions,d.create=function(t,l){var m,f=l.getDom();t.eachComponent("bmap",function(t){var e,o,n,r=l.getZr().painter,i=r.getViewportRoot();if("undefined"==typeof BMap)throw new Error("BMap api is not loaded");function a(t){this._root=t}if(y=y||((a.prototype=new BMap.Overlay).initialize=function(t){return t.getPanes().labelPane.appendChild(this._root),this._root},a.prototype.draw=function(){},a),m)throw new Error("Only one bmap component can exist");t.__bmap||((o=f.querySelector(".ec-extension-bmap"))&&(i.style.left="0px",i.style.top="0px",f.removeChild(o)),(o=document.createElement("div")).style.cssText="width:100%;height:100%",o.classList.add("ec-extension-bmap"),f.appendChild(o),e=t.__bmap=new BMap.Map(o),n=new y(i),e.addOverlay(n),r.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}),e=t.__bmap;var p,s=t.get("center"),c=t.get("zoom");s&&c&&(p=new BMap.Point(s[0],s[1]),e.centerAndZoom(p,c)),(m=new d(e,l)).setMapOffset(t.__mapOffset||[0,0]),m.setZoom(c),m.setCenter(s),t.coordinateSystem=m}),t.eachSeries(function(t){"bmap"===t.get("coordinateSystem")&&(t.coordinateSystem=m)})},e.extendComponentModel({type:"bmap",getBMap:function(){return this.__bmap},setCenterAndZoom:function(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged:function(t,e){var o,n,r=this.option;return o=t,n=r.center,!(o&&n&&o[0]===n[0]&&o[1]===n[1]&&e===r.zoom)},defaultOption:{center:[104.114129,37.550339],zoom:5,mapStyle:{},mapStyleV2:{},roam:!1}});var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},c={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},l=Object.prototype.toString,n=Array.prototype.slice,r=function(){}.constructor,i=r?r.prototype:null;function h(t){if(null==t||"object"!=typeof t)return t;var e,o=t,n=l.call(t);if("[object Array]"===n){if(!m(t)){o=[];for(var r=0,i=t.length;r<i;r++)o[r]=h(t[r])}}else if(c[n]){if(!m(t)){var a=t.constructor;if(a.from)o=a.from(t);else{o=new a(t.length);for(r=0,i=t.length;r<i;r++)o[r]=h(t[r])}}}else if(!s[n]&&!m(t)&&("object"!=typeof(e=t)||"number"!=typeof e.nodeType||"object"!=typeof e.ownerDocument))for(var p in o={},t)t.hasOwnProperty(p)&&(o[p]=h(t[p]));return o}i&&"function"==typeof i.bind&&i.call.bind(i.bind);var a="__ec_primitive__";function m(t){return t[a]}e.extendComponentView({type:"bmap",render:function(r,t,i){function e(t,e){var o,n;a||(o=p.parentNode.parentNode.parentNode,n=[-parseInt(o.style.left,10)||0,-parseInt(o.style.top,10)||0],p.style.left=n[0]+"px",p.style.top=n[1]+"px",s.setMapOffset(n),r.__mapOffset=n,i.dispatchAction({type:"bmapRoam"}))}var a=!0,o=r.getBMap(),p=i.getZr().painter.getViewportRoot(),s=r.coordinateSystem;function n(){a||i.dispatchAction({type:"bmapRoam"})}o.removeEventListener("moving",this._oldMoveHandler),o.removeEventListener("zoomend",this._oldZoomEndHandler),o.addEventListener("moving",e),o.addEventListener("zoomend",n),this._oldMoveHandler=e,this._oldZoomEndHandler=n;var c=r.get("roam");c&&"scale"!==c?o.enableDragging():o.disableDragging(),c&&"move"!==c?(o.enableScrollWheelZoom(),o.enableDoubleClickZoom(),o.enablePinchToZoom()):(o.disableScrollWheelZoom(),o.disableDoubleClickZoom(),o.disablePinchToZoom());var l=r.__mapStyle,m=r.get("mapStyle")||{},f=JSON.stringify(m);JSON.stringify(l)!==f&&(Object.keys(m).length&&o.setMapStyle(h(m)),r.__mapStyle=JSON.parse(f));var d=r.__mapStyle2,y=r.get("mapStyleV2")||{},u=JSON.stringify(y);JSON.stringify(d)!==u&&(Object.keys(y).length&&o.setMapStyleV2(h(y)),r.__mapStyle2=JSON.parse(u)),a=!1}}),e.registerCoordinateSystem("bmap",d),e.registerAction({type:"bmapRoam",event:"bmapRoam",update:"updateLayout"},function(t,e){e.eachComponent("bmap",function(t){var e=t.getBMap(),o=e.getCenter();t.setCenterAndZoom([o.lng,o.lat],e.getZoom())})});t.version="1.0.0",Object.defineProperty(t,"__esModule",{value:!0})});
\ No newline at end of file
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],e):e((t=t||self).bmap={},t.echarts)}(this,function(t,e){"use strict";function d(t,e){this._bmap=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=e,this._projection=new BMap.MercatorProjection}function o(i,a){return a=a||[0,0],e.util.map([0,1],function(t){var e=a[t],o=i[t]/2,n=[],r=[];return n[t]=e-o,r[t]=e+o,n[1-t]=r[1-t]=a[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(r)[t])},this)}var y;d.prototype.dimensions=["lng","lat"],d.prototype.setZoom=function(t){this._zoom=t},d.prototype.setCenter=function(t){this._center=this._projection.lngLatToPoint(new BMap.Point(t[0],t[1]))},d.prototype.setMapOffset=function(t){this._mapOffset=t},d.prototype.getBMap=function(){return this._bmap},d.prototype.dataToPoint=function(t){var e=new BMap.Point(t[0],t[1]),o=this._bmap.pointToOverlayPixel(e),n=this._mapOffset;return[o.x-n[0],o.y-n[1]]},d.prototype.pointToData=function(t){var e=this._mapOffset;return[(t=this._bmap.overlayPixelToPoint({x:t[0]+e[0],y:t[1]+e[1]})).lng,t.lat]},d.prototype.getViewRect=function(){var t=this._api;return new e.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},d.prototype.getRoamTransform=function(){return e.matrix.create()},d.prototype.prepareCustoms=function(){var t=this.getViewRect();return{coordSys:{type:"bmap",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:e.util.bind(this.dataToPoint,this),size:e.util.bind(o,this)}}},d.dimensions=d.prototype.dimensions,d.create=function(t,m){var l,f=m.getDom();t.eachComponent("bmap",function(t){var e,o,n,r=m.getZr().painter,i=r.getViewportRoot();if("undefined"==typeof BMap)throw new Error("BMap api is not loaded");function a(t){this._root=t}if(y=y||((a.prototype=new BMap.Overlay).initialize=function(t){return t.getPanes().labelPane.appendChild(this._root),this._root},a.prototype.draw=function(){},a),l)throw new Error("Only one bmap component can exist");t.__bmap||((o=f.querySelector(".ec-extension-bmap"))&&(i.style.left="0px",i.style.top="0px",f.removeChild(o)),(o=document.createElement("div")).style.cssText="width:100%;height:100%",o.classList.add("ec-extension-bmap"),f.appendChild(o),e=t.__bmap=new BMap.Map(o),n=new y(i),e.addOverlay(n),r.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}),e=t.__bmap;var p,s=t.get("center"),c=t.get("zoom");s&&c&&(p=new BMap.Point(s[0],s[1]),e.centerAndZoom(p,c)),(l=new d(e,m)).setMapOffset(t.__mapOffset||[0,0]),l.setZoom(c),l.setCenter(s),t.coordinateSystem=l}),t.eachSeries(function(t){"bmap"===t.get("coordinateSystem")&&(t.coordinateSystem=l)})},e.extendComponentModel({type:"bmap",getBMap:function(){return this.__bmap},setCenterAndZoom:function(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged:function(t,e){var o,n,r=this.option;return o=t,n=r.center,!(o&&n&&o[0]===n[0]&&o[1]===n[1]&&e===r.zoom)},defaultOption:{center:[104.114129,37.550339],zoom:5,mapStyle:{},mapStyleV2:{},roam:!1}});var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},c={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},m=Object.prototype.toString,n=Array.prototype.slice,r=function(){}.constructor,i=r?r.prototype:null;function h(t){if(null==t||"object"!=typeof t)return t;var e,o=t,n=m.call(t);if("[object Array]"===n){if(!l(t)){o=[];for(var r=0,i=t.length;r<i;r++)o[r]=h(t[r])}}else if(c[n]){if(!l(t)){var a=t.constructor;if(a.from)o=a.from(t);else{o=new a(t.length);for(r=0,i=t.length;r<i;r++)o[r]=h(t[r])}}}else if(!s[n]&&!l(t)&&("object"!=typeof(e=t)||"number"!=typeof e.nodeType||"object"!=typeof e.ownerDocument))for(var p in o={},t)t.hasOwnProperty(p)&&(o[p]=h(t[p]));return o}i&&"function"==typeof i.bind&&i.call.bind(i.bind);var a="__ec_primitive__";function l(t){return t[a]}e.extendComponentView({type:"bmap",render:function(r,t,i){function e(t,e){var o,n;a||(o=p.parentNode.parentNode.parentNode,n=[-parseInt(o.style.left,10)||0,-parseInt(o.style.top,10)||0],p.style.left=n[0]+"px",p.style.top=n[1]+"px",s.setMapOffset(n),r.__mapOffset=n,i.dispatchAction({type:"bmapRoam",animation:{duration:0}}))}var a=!0,o=r.getBMap(),p=i.getZr().painter.getViewportRoot(),s=r.coordinateSystem;function n(){a||i.dispatchAction({type:"bmapRoam",animation:{duration:0}})}o.removeEventListener("moving",this._oldMoveHandler),o.removeEventListener("zoomend",this._oldZoomEndHandler),o.addEventListener("moving",e),o.addEventListener("zoomend",n),this._oldMoveHandler=e,this._oldZoomEndHandler=n;var c=r.get("roam");c&&"scale"!==c?o.enableDragging():o.disableDragging(),c&&"move"!==c?(o.enableScrollWheelZoom(),o.enableDoubleClickZoom(),o.enablePinchToZoom()):(o.disableScrollWheelZoom(),o.disableDoubleClickZoom(),o.disablePinchToZoom());var m=r.__mapStyle,l=r.get("mapStyle")||{},f=JSON.stringify(l);JSON.stringify(m)!==f&&(Object.keys(l).length&&o.setMapStyle(h(l)),r.__mapStyle=JSON.parse(f));var d=r.__mapStyle2,y=r.get("mapStyleV2")||{},u=JSON.stringify(y);JSON.stringify(d)!==u&&(Object.keys(y).length&&o.setMapStyleV2(h(y)),r.__mapStyle2=JSON.parse(u)),a=!1}}),e.registerCoordinateSystem("bmap",d),e.registerAction({type:"bmapRoam",event:"bmapRoam",update:"updateLayout"},function(t,e){e.eachComponent("bmap",function(t){var e=t.getBMap(),o=e.getCenter();t.setCenterAndZoom([o.lng,o.lat],e.getZoom())})});t.version="1.0.0",Object.defineProperty(t,"__esModule",{value:!0})});
\ No newline at end of file
......@@ -234,9 +234,7 @@
return children;
}
var gexf =
/*#__PURE__*/
Object.freeze({
var gexf = /*#__PURE__*/Object.freeze({
__proto__: null,
parse: parse
});
......
此差异已折叠。
{
"name": "echarts",
"version": "5.0.0-alpha.1",
"version": "5.0.0-alpha.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -7481,7 +7481,8 @@
"tslib": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
"dev": true
},
"tsutils": {
"version": "3.17.1",
......@@ -7952,11 +7953,18 @@
}
},
"zrender": {
"version": "5.0.0-alpha.1",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.0-alpha.1.tgz",
"integrity": "sha512-4iGc4DRCI526gxAOEEPPRAwAHDZamXqvJhs/O/dd2R8vPUvaBxo/8NOmqVuWZXQEHo2+XZg++PPUsvWq6fZ/3A==",
"version": "5.0.0-alpha.2",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.0-alpha.2.tgz",
"integrity": "sha512-QZHAsZGO6gHnDBrhr9G4jGvO6jmeLzwkOcqpqyqUPHz59fIvht55Yn1Z3vEhjjr7HTq5LfuHUAh30eYQsg5YGg==",
"requires": {
"tslib": "^1.10.0"
"tslib": "1.10.0"
},
"dependencies": {
"tslib": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
}
}
}
}
......
{
"name": "echarts",
"version": "5.0.0-alpha.1",
"version": "5.0.0-alpha.2",
"description": "A powerful charting and visualization library for browser",
"license": "Apache-2.0",
"keywords": [
......@@ -34,7 +34,7 @@
"lint:dist": "echo 'It might take a while. Please wait ...' && ./node_modules/.bin/jshint --config .jshintrc-dist dist/echarts.js"
},
"dependencies": {
"zrender": "5.0.0-alpha.1"
"zrender": "5.0.0-alpha.2"
},
"devDependencies": {
"@babel/core": "7.3.4",
......
......@@ -113,10 +113,10 @@ const each = zrUtil.each;
const isFunction = zrUtil.isFunction;
const isObject = zrUtil.isObject;
export const version = '5.0.0-alpha.1';
export const version = '5.0.0-alpha.2';
export const dependencies = {
zrender: '5.0.0-alpha.1'
zrender: '5.0.0-alpha.2'
};
const TEST_FRAME_REMAIN_TIME = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册