0
function ganttChart(gContainerID) {
this.gContainer = document.getElementById(gContainerID);
this.gCurrentMouseX;
this.gCurrentMouseY;
this.gAttatchMove = function(self) {
self.gContainer.onmousemove = function() {
if (self.gIsDraggingBar) {
self.gUpdateMousePos();
self.gBarBeingDragged.style.left = (self.gBarStartX - (self.gMouseStartX - self.gCurrentMouseX)) + "px";
}
};
self.gContainer.onmouseup = function() {
self.gIsDraggingBar = false;
};
}
var self = this;
this.gAttatchMove(self);
// Update mouse coords
this.gUpdateMousePos = function(evt) {
if (window.event) {
this.gCurrentMouseX = event.x;
this.gCurrentMouseY = event.y;
}
else {
this.gCurrentMouseX = evt.x;
this.gCurrentMouseY = evt.y;
}
}
이 크롬에서 잘 작동하지만 FF 오류가 발생합니다 :자바 스크립트 'EVT는 정의되지 않는다'하지만 크롬에서 작동
evt is undefined