Fix calculating bottom event position.
authorJan Schneider <jan@horde.org>
Mon, 21 Sep 2009 17:00:18 +0000 (19:00 +0200)
committerJan Schneider <jan@horde.org>
Mon, 28 Sep 2009 09:40:45 +0000 (11:40 +0200)
kronolith/js/kronolith.js

index 304e750..61fe1e4 100644 (file)
@@ -1002,8 +1002,8 @@ KronolithCore = {
                 draggerBottom = new Element('DIV', { 'id': event.value.nodeId + 'bottom', 'class': 'kronolithDragger kronolithDraggerBottom' }).setStyle(style);
 
             div.setStyle({
-                'top': ((midnight.getElapsed(event.value.start) / 60000 | 0) * this[storage].height / 60 + this[storage].offset | 0) + 'px',
-                'height': ((event.value.start.getElapsed(event.value.end) / 60000 | 0) * this[storage].height / 60 - this[storage].spacing | 0) + 'px',
+                'top': (Math.round(midnight.getElapsed(event.value.start) / 60000) * this[storage].height / 60 + this[storage].offset | 0) + 'px',
+                'height': (Math.round(event.value.start.getElapsed(event.value.end) / 60000) * this[storage].height / 60 - this[storage].spacing | 0) + 'px',
                 'width': '100%'
             })
                 .insert(innerDiv.setStyle(style))