提交 92d61552 编写于 作者: K kener

event this 对象指向myChart

上级 8ba3a5ea
......@@ -1042,7 +1042,8 @@ define(function (require) {
this.messageCenter.dispatch(
ecConfig.EVENT.MAP_ROAM,
param.event,
{type : 'scale'}
{type : 'scale'},
this.myChart
);
}
},
......@@ -1097,7 +1098,8 @@ define(function (require) {
this.messageCenter.dispatch(
ecConfig.EVENT.MAP_ROAM,
param.event,
{type : 'move'}
{type : 'move'},
this.myChart
);
this.clearEffectShape(true);
......@@ -1173,7 +1175,8 @@ define(function (require) {
{
selected : this._selected,
target : name
}
},
this.myChart
);
this.zr.refresh();
......
......@@ -934,7 +934,8 @@ define(function (require) {
{
selected : this._selected,
target : ecData.get(target, 'name')
}
},
this.myChart
);
this.zr.refresh();
}
......
......@@ -924,7 +924,8 @@ define(function (require) {
start : this._range.end,
end : this._range.start
}
}
},
this.myChart
);
}
......@@ -1116,7 +1117,8 @@ define(function (require) {
start : this._range.end,
end : this._range.start
}
}
},
this.myChart
);
}
},
......@@ -1125,7 +1127,7 @@ define(function (require) {
__dataRangeSelected : function (param) {
var idx = param.target._idx;
this._selectedMap[idx] = !this._selectedMap[idx];
this.messageCenter.dispatch(ecConfig.EVENT.REFRESH);
this.messageCenter.dispatch(ecConfig.EVENT.REFRESH, null, null, this.myChart);
},
_textFormat : function(valueStart, valueEnd) {
......
......@@ -267,7 +267,8 @@ define(function (require) {
self.messageCenter && self.messageCenter.dispatch(
ecConfig.EVENT.DATA_VIEW_CHANGED,
null,
{option : self.option}
{option : self.option},
self.myChart
);
},
// 有动画,所以高级浏览器时间更长点
......
......@@ -587,7 +587,7 @@ define(function (require) {
this._startFrameShape = new RectangleShape(this._startFrameShape);
this._endFrameShape = new RectangleShape(this._endFrameShape);
this.shapeList.push(this._startFrameShape);
this.shapeList.push();
this.shapeList.push(this._endFrameShape);
return;
},
......@@ -760,7 +760,8 @@ define(function (require) {
this.messageCenter.dispatch(
ecConfig.EVENT.DATA_ZOOM,
null,
{zoom: this._zoom}
{zoom: this._zoom},
this.myChart
);
}
......@@ -893,7 +894,8 @@ define(function (require) {
this.messageCenter.dispatch(
ecConfig.EVENT.DATA_ZOOM,
null,
{zoom: this._zoom}
{zoom: this._zoom},
this.myChart
);
}
status.needRefresh = false; // 会有消息触发fresh,不用再刷一遍
......
......@@ -568,7 +568,8 @@ define(function (require) {
{
selected : this._selectedMap,
target : itemName
}
},
this.myChart
);
},
......@@ -768,7 +769,8 @@ define(function (require) {
{
selected : this._selectedMap,
target : itemName
}
},
this.myChart
);
},
......
......@@ -52,7 +52,8 @@ define(function (require) {
data : typeof timelineOption.data[self.currentIndex].name != 'undefined'
? timelineOption.data[self.currentIndex].name
: timelineOption.data[self.currentIndex]
}
},
self.myChart
);
};
self._onFrame = function() {
......
......@@ -756,7 +756,7 @@ define(function (require) {
__onRestore : function (){
this._resetMark();
this._resetZoom();
this.messageCenter.dispatch(ecConfig.EVENT.RESTORE);
this.messageCenter.dispatch(ecConfig.EVENT.RESTORE, null, null, this.myChart);
return true;
},
......@@ -867,7 +867,8 @@ define(function (require) {
this.messageCenter.dispatch(
ecConfig.EVENT.MAGIC_TYPE_CHANGED,
param.event,
{magicType : this._magicType}
{magicType : this._magicType},
this.myChart
);
}
......@@ -881,7 +882,8 @@ define(function (require) {
!this._isSilence && this.messageCenter.dispatch(
ecConfig.EVENT.MAGIC_TYPE_CHANGED,
null,
{magicType : this._magicType}
{magicType : this._magicType},
this.myChart
);
},
......
......@@ -488,7 +488,9 @@ define(function (require) {
_showAxisTrigger : function (xAxisIndex, yAxisIndex, dataIndex) {
!this._event.connectTrigger && this.messageCenter.dispatch(
ecConfig.EVENT.TOOLTIP_IN_GRID,
this._event
this._event,
null,
this.myChart
);
if (typeof this.component.xAxis == 'undefined'
|| typeof this.component.yAxis == 'undefined'
......@@ -553,7 +555,8 @@ define(function (require) {
{
seriesIndex : seriesIndex,
dataIndex : dataIndex
}
},
this.myChart
);
y = zrEvent.getY(this._event);
x = this.subPixelOptimize(
......@@ -598,7 +601,8 @@ define(function (require) {
{
seriesIndex : seriesIndex,
dataIndex : dataIndex
}
},
this.myChart
);
x = zrEvent.getX(this._event);
y = this.subPixelOptimize(
......@@ -1195,7 +1199,9 @@ define(function (require) {
else {
!this._event.connectTrigger && this.messageCenter.dispatch(
ecConfig.EVENT.TOOLTIP_OUT_GRID,
this._event
this._event,
null,
this.myChart
);
this._hidingTicket = setTimeout(this._hide, this._hideDelay);
}
......
......@@ -310,7 +310,8 @@ define(function (require) {
this._messageCenter.dispatch(
ecConfig.EVENT.CLICK,
param.event,
ecData
ecData,
this
);
}
}
......@@ -326,7 +327,8 @@ define(function (require) {
this._messageCenter.dispatch(
ecConfig.EVENT.HOVER,
param.event,
ecData
ecData,
this
);
}
}
......@@ -418,9 +420,10 @@ define(function (require) {
this._messageCenter.dispatch(
ecConfig.EVENT.DATA_CHANGED,
param.event,
this._eventPackage(param.target)
this._eventPackage(param.target),
this
);
this._messageCenter.dispatch(ecConfig.EVENT.REFRESH);
this._messageCenter.dispatch(ecConfig.EVENT.REFRESH, null, null, this);
}
},
......@@ -437,7 +440,7 @@ define(function (require) {
&& this._chartList[len].onlegendSelected(param, this._status);
}
if (this._status.needRefresh) {
this._messageCenter.dispatch(ecConfig.EVENT.REFRESH);
this._messageCenter.dispatch(ecConfig.EVENT.REFRESH, null, null, this);
}
},
......@@ -455,7 +458,7 @@ define(function (require) {
}
if (this._status.needRefresh) {
this._messageCenter.dispatch(ecConfig.EVENT.REFRESH);
this._messageCenter.dispatch(ecConfig.EVENT.REFRESH, null, null, this);
}
},
......@@ -495,9 +498,10 @@ define(function (require) {
this._messageCenter.dispatch(
ecConfig.EVENT.DATA_CHANGED,
null,
param
param,
this
);
this._messageCenter.dispatch(ecConfig.EVENT.REFRESH);
this._messageCenter.dispatch(ecConfig.EVENT.REFRESH, null, null, this);
},
/**
......@@ -1118,8 +1122,9 @@ define(function (require) {
}
self._messageCenter.dispatch(
ecConfig.EVENT.REFRESH,
'',
{option: magicOption}
null,
{option: magicOption},
self
);
}, magicOption.addDataAnimation ? 500 : 0);
return this;
......@@ -1593,7 +1598,7 @@ define(function (require) {
}
self.component.grid && self.component.grid.refixAxisShape(self.component);
self._zr.refresh();
self._messageCenter.dispatch(ecConfig.EVENT.RESIZE);
self._messageCenter.dispatch(ecConfig.EVENT.RESIZE, null, null, self);
return self;
};
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册