Skip to content

Commit

Permalink
1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sih44 committed Oct 23, 2017
1 parent 85fdb67 commit a7a776f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions dist/tippy.js
Expand Up @@ -422,12 +422,12 @@ function getCorePlacement(placement) {
function followCursorHandler(e) {
var _this = this;

var refData = find(Store, function (refData) {
return refData.el === _this;
var data = find(Store, function (data) {
return data.el === _this;
});

var popper = refData.popper,
offset = refData.settings.offset;
var popper = data.popper,
offset = data.settings.offset;


var position = getCorePlacement(popper.getAttribute('x-placement'));
Expand All @@ -446,20 +446,20 @@ function followCursorHandler(e) {
switch (position) {
case 'top':
x = pageX - halfPopperWidth + offset;
y = pageY - 2.25 * halfPopperHeight;
y = pageY - 2 * halfPopperHeight;
break;
case 'bottom':
x = pageX - halfPopperWidth + offset;
y = pageY + 10;
break;
case 'left':
x = pageX - 2 * halfPopperWidth - 10;
x = pageX - 2 * halfPopperWidth;
y = pageY - halfPopperHeight + offset;
break;
case 'right':
x = pageX + halfPopperHeight;
x = pageX + 5;
y = pageY - halfPopperHeight + offset;
break;
case 'bottom':
x = pageX - halfPopperWidth + offset;
y = pageY + halfPopperHeight / 1.5;
break;
}

var isRightOverflowing = pageX + viewportPadding + halfPopperWidth + offset > pageWidth;
Expand Down
2 changes: 1 addition & 1 deletion dist/tippy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tippy.standalone.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tippy/tippy.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tippy.js",
"version": "1.4.0",
"version": "1.4.1",
"description": "Vanilla JS Tooltip Library",
"main": "dist/tippy.js",
"scripts": {
Expand Down

0 comments on commit a7a776f

Please sign in to comment.