lib/capybara/poltergeist/client/compiled/node.js in poltergeist-1.3.0 vs lib/capybara/poltergeist/client/compiled/node.js in poltergeist-1.4.0

- old
+ new

@@ -17,11 +17,10 @@ _ref = Node.DELEGATES; _fn = function(name) { return Node.prototype[name] = function() { var args; - args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return this.page.nodeCall(this.id, name, args); }; }; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -29,11 +28,10 @@ _fn(name); } Node.prototype.mouseEventPosition = function() { var middle, pos, viewport; - viewport = this.page.viewportSize(); pos = this.position(); middle = function(start, end, size) { return start + ((Math.min(end, size) - start) / 2); }; @@ -43,11 +41,10 @@ }; }; Node.prototype.mouseEvent = function(name) { var pos, test; - this.scrollIntoView(); pos = this.mouseEventPosition(); test = this.mouseEventTest(pos.x, pos.y); if (test.status === 'success') { this.page.mouseEvent(name, pos.x, pos.y); @@ -57,10 +54,9 @@ } }; Node.prototype.dragTo = function(other) { var otherPosition, position; - this.scrollIntoView(); position = this.mouseEventPosition(); otherPosition = other.mouseEventPosition(); this.page.mouseEvent('mousedown', position.x, position.y); return this.page.mouseEvent('mouseup', otherPosition.x, otherPosition.y);