Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Commit

Permalink
fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Shaev committed Mar 1, 2016
1 parent ec69adf commit efe2fcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lrDragNDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
dropIndex, i, l;
if (item !== null) {
dropIndex = scope.$index;
var offsetX = window.jQuery ? evt.originalEvent.offsetX : evt.offsetX;
var offsetY = window.jQuery ? evt.originalEvent.offsetY : evt.offsetY;
var offsetX = window.jQuery && evt.originalEvent ? evt.originalEvent.offsetX : evt.offsetX;
var offsetY = window.jQuery && evt.originalEvent ? evt.originalEvent.offsetY : evt.offsetY;
dropIndex = isAfter(offsetX, offsetY) ? dropIndex + 1 : dropIndex;
//srcCollection=targetCollection => we may need to apply a correction
if (collectionCopy.length > collection.length) {
Expand All @@ -169,8 +169,8 @@
element.bind('dragover', function (evt) {
var className;
if (store.isHolding(key)) {
var offsetX = window.jQuery ? evt.originalEvent.offsetX : evt.offsetX;
var offsetY = window.jQuery ? evt.originalEvent.offsetY : evt.offsetY;
var offsetX = window.jQuery && evt.originalEvent ? evt.originalEvent.offsetX : evt.offsetX;
var offsetY = window.jQuery && evt.originalEvent ? evt.originalEvent.offsetY : evt.offsetY;
className = isAfter(offsetX, offsetY) ? 'lr-drop-target-after' : 'lr-drop-target-before';
if (classCache !== className && classCache !== null) {
element.removeClass(classCache);
Expand Down

0 comments on commit efe2fcb

Please sign in to comment.