时间轴增加事件。

This commit is contained in:
liteng 2018-09-21 07:46:50 +08:00
parent 59615b1859
commit 7d09706a14

View File

@ -141,6 +141,14 @@ AnimationPanel.prototype.onAppStarted = function () {
context.fillText(text, i * scale, 16);
}
var timeline = UI.get('timeline', this.id);
timeline.dom.addEventListener(`click.${this.id}`, this.onClick.bind(this));
timeline.dom.addEventListener(`dblclick.${this.id}`, this.onDblClick.bind(this));
timeline.dom.addEventListener(`mousedown.${this.id}`, this.onMouseDown.bind(this));
timeline.dom.addEventListener(`mousemove.${this.id}`, this.onMouseMove.bind(this));
timeline.dom.addEventListener(`mouseup.${this.id}`, this.onMouseUp.bind(this));
};
AnimationPanel.prototype.updateUI = function () {
@ -214,4 +222,24 @@ AnimationPanel.prototype.onStop = function () {
this.updateUI();
};
AnimationPanel.prototype.onClick = function () {
};
AnimationPanel.prototype.onDblClick = function () {
};
AnimationPanel.prototype.onMouseDown = function () {
};
AnimationPanel.prototype.onMouseMove = function () {
};
AnimationPanel.prototype.onMouseUp = function () {
};
export default AnimationPanel;