Skip to content

Commit

Permalink
fix position for hints
Browse files Browse the repository at this point in the history
  • Loading branch information
olton committed Aug 17, 2014
1 parent 93bf8bc commit bdf7d34
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/js/metro.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/js/metro/metro-hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
if (o.position == 'top') {
_hint.css({
top: element.offset().top - $(window).scrollTop() - _hint.outerHeight() - 20,
left: o.mode == 2 ? element.offset().left + element.outerWidth()/2 - _hint.outerWidth()/2 : element.offset().left - $(window).scrollLeft()
left: o.mode == 2 ? element.offset().left + element.outerWidth()/2 - _hint.outerWidth()/2 - $(window).scrollLeft(): element.offset().left - $(window).scrollLeft()
});
} else if (o.position == 'bottom') {
_hint.css({
top: element.offset().top - $(window).scrollTop() + element.outerHeight(),
left: o.mode == 2 ? element.offset().left + element.outerWidth()/2 - _hint.outerWidth()/2 : element.offset().left - $(window).scrollLeft()
left: o.mode == 2 ? element.offset().left + element.outerWidth()/2 - _hint.outerWidth()/2 - $(window).scrollLeft(): element.offset().left - $(window).scrollLeft()
});
} else if (o.position == 'right') {
_hint.css({
Expand Down
4 changes: 2 additions & 2 deletions js/metro-hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
if (o.position == 'top') {
_hint.css({
top: element.offset().top - $(window).scrollTop() - _hint.outerHeight() - 20,
left: o.mode == 2 ? element.offset().left + element.outerWidth()/2 - _hint.outerWidth()/2 : element.offset().left - $(window).scrollLeft()
left: o.mode == 2 ? element.offset().left + element.outerWidth()/2 - _hint.outerWidth()/2 - $(window).scrollLeft(): element.offset().left - $(window).scrollLeft()
});
} else if (o.position == 'bottom') {
_hint.css({
top: element.offset().top - $(window).scrollTop() + element.outerHeight(),
left: o.mode == 2 ? element.offset().left + element.outerWidth()/2 - _hint.outerWidth()/2 : element.offset().left - $(window).scrollLeft()
left: o.mode == 2 ? element.offset().left + element.outerWidth()/2 - _hint.outerWidth()/2 - $(window).scrollLeft(): element.offset().left - $(window).scrollLeft()
});
} else if (o.position == 'right') {
_hint.css({
Expand Down
6 changes: 3 additions & 3 deletions min/metro.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bdf7d34

Please sign in to comment.