提交 2777d80b 编写于 作者: P pah100

Merge branch 'master' of https://github.com/ecomfe/echarts

......@@ -30,7 +30,8 @@ define(function (require) {
zoomLimit.min
) / previousZoom;
}
// var roamTransform = view.getRoamTransform();
// Zoom on given point(originX, originY)
view.scale[0] *= zoom;
view.scale[1] *= zoom;
var position = view.position;
......
......@@ -81,8 +81,7 @@ define(function (require) {
var map = echarts.getMap(option.map);
var geoJson = map && map.geoJson;
geoJson && option.data
&& (option.data = fillData(option.data, geoJson));
geoJson && (option.data = fillData((option.data || []), geoJson));
return option;
},
......@@ -157,17 +156,8 @@ define(function (require) {
scaleLimit: null,
label: {
normal: {
show: false,
textStyle: {
color: '#000'
}
},
emphasis: {
show: false,
textStyle: {
color: '#000'
}
show: true
}
},
// scaleLimit: null,
......
......@@ -28,7 +28,7 @@ define(function (require) {
var mapDraw = this._mapDraw || new MapDraw(api, true);
group.add(mapDraw.group);
mapDraw.draw(mapModel, ecModel, api, this);
mapDraw.draw(mapModel, ecModel, api, this, payload);
this._mapDraw = mapDraw;
}
......
......@@ -15,9 +15,9 @@ define(function (require) {
this.group.add(mapDraw.group);
},
render: function (geoModel, ecModel, api) {
render: function (geoModel, ecModel, api, payload) {
geoModel.get('show') &&
this._mapDraw.draw(geoModel, ecModel, api);
this._mapDraw.draw(geoModel, ecModel, api, this, payload);
}
});
});
\ No newline at end of file
......@@ -78,7 +78,7 @@ define(function (require) {
constructor: MapDraw,
draw: function (mapOrGeoModel, ecModel, api, fromView) {
draw: function (mapOrGeoModel, ecModel, api, fromView, payload) {
// geoModel has no data
var data = mapOrGeoModel.getData && mapOrGeoModel.getData();
......@@ -89,8 +89,18 @@ define(function (require) {
group.removeAll();
var scale = geo.scale;
group.position = geo.position.slice();
group.scale = scale.slice();
var groupNewProp = {
position: geo.position,
scale: scale
};
// No animation when first draw or in action
if (!group.childAt(0) || payload) {
group.attr(groupNewProp);
}
else {
graphic.updateProps(group, groupNewProp, mapOrGeoModel);
}
var itemStyleModel;
var hoverItemStyleModel;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册