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 8963 71e85d3e50f798a1f01e3b2a9ce549732511705e
parent 8962 1725775e93341b733bd9ec9cb1c9c950378ecd7f
child 8966 2deefa1ecd9aeef2eaedd8cbd628b8b409258e17
push idunknown
push userunknown
push dateunknown
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
@@ -1990,17 +1990,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);