if (draggerTop) {
opts.snap = function(x, y) {
- y = Math.max(0, step * (Math.min(maxTop, y) / step | 0)) - this.scrollTop;
+ y = Math.max(0, step * (Math.min(maxTop, y - this.scrollTop) / step | 0));
return [0, y];
}.bind(this);
var d = new Drag(event.value.nodeId + 'top', opts);
if (draggerBottom) {
opts.snap = function(x, y) {
- y = Math.min(maxBottom + dragBottomHeight + KronolithCore[storage].spacing, step * ((Math.max(minBottom, y) + dragBottomHeight + KronolithCore[storage].spacing) / step | 0)) - dragBottomHeight - KronolithCore[storage].spacing - this.scrollTop;
+ y = Math.min(maxBottom + dragBottomHeight + KronolithCore[storage].spacing, step * ((Math.max(minBottom, y - this.scrollTop) + dragBottomHeight + KronolithCore[storage].spacing) / step | 0)) - dragBottomHeight - KronolithCore[storage].spacing;
return [0, y];
}.bind(this);
var d = new Drag(event.value.nodeId + 'bottom', opts);
x = (view == 'week')
? Math.max(minLeft, stepX * ((Math.min(maxLeft, x - (x < 0 ? stepX : 0)) + stepX / 2) / stepX | 0))
: 0;
- y = Math.max(0, step * (Math.min(maxDiv, y) / step | 0)) - this.scrollTop;
+ y = Math.max(0, step * (Math.min(maxDiv, y - this.scrollTop) / step | 0));
return [x, y];
}.bind(this)
});