simulate - round(floor) the center x and y values

This commit is contained in:
Richard Worth 2008-06-06 03:59:57 +00:00
parent 473de51ff0
commit 5dde75c3e2

View File

@ -112,7 +112,7 @@ $.extend($.simulate.prototype, {
drag: function(el) {
var self = this, center = this.findCenter(this.target),
options = this.options, x = center.x, y = center.y,
options = this.options, x = Math.floor(center.x), y = Math.floor(center.y),
dx = options.dx || 0, dy = options.dy || 0, target = this.target;
var coord = { clientX: x, clientY: y };
this.simulateEvent(target, "mouseover");