Fix bug 695136 - In rotate view (day/week views), creating events via drag and drop doesn't work. r=philipp,a=philipp
authorDecathlon <bv1578@gmail.com>
Mon, 17 Oct 2011 13:53:00 +0200
changeset 8908 123588224f66d8b68a3640c4723193d92f25f525
parent 8907 f7add7fc21a63f58914a5340382b3b2dbc6f71fc
child 8909 17b5b7a4fee03056a667ee054fce6d2c236014af
push id226
push usermozilla@kewis.ch
push dateSun, 30 Oct 2011 12:19:34 +0000
treeherdercomm-aurora@123588224f66 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp, philipp
bugs695136
Fix bug 695136 - In rotate view (day/week views), creating events via drag and drop doesn't work. r=philipp,a=philipp
calendar/base/content/calendar-multiday-view.xml
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -1992,17 +1992,17 @@
         let interval = this.mPixPerMin * snapIntMin;
 
         if (this.getAttribute("orient") == "vertical") {
             this.mDragState.origLoc = event.screenY;
             this.mDragState.origMin = Math.floor((event.screenY - this.parentNode.boxObject.screenY)/interval) * snapIntMin;
             this.fgboxes.dragspacer.setAttribute("height", this.mDragState.origMin * this.mPixPerMin);
         } else {
             this.mDragState.origLoc = event.screenX;
-            this.mDragState.origMin = Math.floor((event.screenY - this.parentNode.boxObject.screenY)/interval) * snapIntMin;
+            this.mDragState.origMin = Math.floor((event.screenX - this.parentNode.boxObject.screenX)/interval) * snapIntMin;
             this.fgboxes.dragspacer.setAttribute("width", this.mDragState.origMin * this.mPixPerMin);
         }
 
         document.calendarEventColumnDragging = this;
 
         window.addEventListener("mousemove", this.onEventSweepMouseMove, false);
         window.addEventListener("mouseup", this.onEventSweepMouseUp, false);
         window.addEventListener("keypress", this.onEventSweepKeypress, false);