guy 7 years ago
parent
commit
b19251e8e4
  1. 6
      bi/core.js
  2. 6
      dist/bundle.js
  3. 6
      dist/core.js

6
bi/core.js

@ -18759,13 +18759,14 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (!this.has(name)) { if (!this.has(name)) {
this.create(name, text, level, opt.container || context); this.create(name, text, level, opt.container || context);
} }
if (!opt.belowMouse) {
var offset = context.element.offset(); var offset = context.element.offset();
var bounds = context.element.bounds(); var bounds = context.element.bounds();
if (bounds.height === 0 || bounds.width === 0) { if (bounds.height === 0 || bounds.width === 0) {
return; return;
} }
var top = offset.top + bounds.height + 5; var top = offset.top + bounds.height + 5;
}
var tooltip = this.get(name); var tooltip = this.get(name);
tooltip.setText(text); tooltip.setText(text);
tooltip.element.css({ tooltip.element.css({
@ -18781,8 +18782,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
} }
if (y + tooltip.element.outerHeight() > $("body").outerHeight()) { if (y + tooltip.element.outerHeight() > $("body").outerHeight()) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
top = offset.top - tooltip.element.outerHeight() - 5; !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
!opt.belowMouse && (y = Math.min(y, top));
} else { } else {
!opt.belowMouse && (y = Math.max(y, top)); !opt.belowMouse && (y = Math.max(y, top));
} }

6
dist/bundle.js vendored

@ -18759,13 +18759,14 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (!this.has(name)) { if (!this.has(name)) {
this.create(name, text, level, opt.container || context); this.create(name, text, level, opt.container || context);
} }
if (!opt.belowMouse) {
var offset = context.element.offset(); var offset = context.element.offset();
var bounds = context.element.bounds(); var bounds = context.element.bounds();
if (bounds.height === 0 || bounds.width === 0) { if (bounds.height === 0 || bounds.width === 0) {
return; return;
} }
var top = offset.top + bounds.height + 5; var top = offset.top + bounds.height + 5;
}
var tooltip = this.get(name); var tooltip = this.get(name);
tooltip.setText(text); tooltip.setText(text);
tooltip.element.css({ tooltip.element.css({
@ -18781,8 +18782,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
} }
if (y + tooltip.element.outerHeight() > $("body").outerHeight()) { if (y + tooltip.element.outerHeight() > $("body").outerHeight()) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
top = offset.top - tooltip.element.outerHeight() - 5; !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
!opt.belowMouse && (y = Math.min(y, top));
} else { } else {
!opt.belowMouse && (y = Math.max(y, top)); !opt.belowMouse && (y = Math.max(y, top));
} }

6
dist/core.js vendored

@ -18759,13 +18759,14 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (!this.has(name)) { if (!this.has(name)) {
this.create(name, text, level, opt.container || context); this.create(name, text, level, opt.container || context);
} }
if (!opt.belowMouse) {
var offset = context.element.offset(); var offset = context.element.offset();
var bounds = context.element.bounds(); var bounds = context.element.bounds();
if (bounds.height === 0 || bounds.width === 0) { if (bounds.height === 0 || bounds.width === 0) {
return; return;
} }
var top = offset.top + bounds.height + 5; var top = offset.top + bounds.height + 5;
}
var tooltip = this.get(name); var tooltip = this.get(name);
tooltip.setText(text); tooltip.setText(text);
tooltip.element.css({ tooltip.element.css({
@ -18781,8 +18782,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
} }
if (y + tooltip.element.outerHeight() > $("body").outerHeight()) { if (y + tooltip.element.outerHeight() > $("body").outerHeight()) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
top = offset.top - tooltip.element.outerHeight() - 5; !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
!opt.belowMouse && (y = Math.min(y, top));
} else { } else {
!opt.belowMouse && (y = Math.max(y, top)); !opt.belowMouse && (y = Math.max(y, top));
} }

Loading…
Cancel
Save