Skip to content

Commit

Permalink
Fix test helpers in ember-cli-qunit 3.0 (#106)
Browse files Browse the repository at this point in the history
closes #105
  • Loading branch information
omghax authored and acburdine committed Oct 27, 2016
1 parent 9b03b52 commit ecff51b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addon/helpers/drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ export function drag(app, mode, itemSelector, offsetFn, callbacks = {}) {
let item = findWithAssert(itemSelector);
let itemOffset = item.offset();
let offset = offsetFn();
let targetX = itemOffset.left + offset.dx;
let targetY = itemOffset.top + offset.dy;
let itemElement = item.get(0);
let rect = itemElement.getBoundingClientRect();
let scale = itemElement.clientHeight / (rect.bottom - rect.top);
let targetX = itemOffset.left + offset.dx * scale;
let targetY = itemOffset.top + offset.dy * scale;

triggerEvent(app, item, start, {
pageX: itemOffset.left,
Expand Down

0 comments on commit ecff51b

Please sign in to comment.