mirror of
https://gitlab.com/JKANetwork/CheckServer.git
synced 2026-03-26 04:12:01 +01:00
Start again
This commit is contained in:
35
vendors/echarts/extension/bmap/BMapModel.js
vendored
Normal file
35
vendors/echarts/extension/bmap/BMapModel.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
define(function (require) {
|
||||
|
||||
function v2Equal(a, b) {
|
||||
return a && b && a[0] === b[0] && a[1] === b[1];
|
||||
}
|
||||
|
||||
return require('echarts').extendComponentModel({
|
||||
type: 'bmap',
|
||||
|
||||
getBMap: function () {
|
||||
// __bmap is injected when creating BMapCoordSys
|
||||
return this.__bmap;
|
||||
},
|
||||
|
||||
setCenterAndZoom: function (center, zoom) {
|
||||
this.option.center = center;
|
||||
this.option.zoom = zoom;
|
||||
},
|
||||
|
||||
centerOrZoomChanged: function (center, zoom) {
|
||||
var option = this.option;
|
||||
return !(v2Equal(center, option.center) && zoom === option.zoom);
|
||||
},
|
||||
|
||||
defaultOption: {
|
||||
center: null,
|
||||
|
||||
zoom: 1,
|
||||
|
||||
mapStyle: {},
|
||||
|
||||
roam: false
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user