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

Commit

Permalink
Merge pull request #7 from nathanyarnold/fix-top-position-of-target
Browse files Browse the repository at this point in the history
Fixed top-position calculation of target
  • Loading branch information
gabrielbull authored Jun 15, 2018
2 parents 510dba1 + 34c8efd commit f40bc23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corners.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function corners(source, target) {
let ver, hor;

hor = inside(source.left, target.left, target.left + target.width);
ver = inside(source.top, target.top, target.top + target.height);
ver = inside(source.top, target.top, source.top + target.height);

if (hor === -1 && ver === -1) return ['top-right', 'bottom-left'];
if (hor === -1 && ver === 0) return ['top-right', 'bottom-right'];
Expand Down

0 comments on commit f40bc23

Please sign in to comment.