META-INF.resources.butterfaces-dist-js.butterfaces-tooltip.min.js Maven / Gradle / Ivy
var ButterFaces;!function(t){var o=function(){function t(t,o){void 0===t&&(t=276),void 0===o&&(o=110),this.popoverMaxWidthByBootstrap=t,this.popoverMaxHeightByButterFaces=o,console.log("ButterFaces.Tooltip.constructor - popoverMaxWidthByBootstrap is "+this.popoverMaxHeightByButterFaces+", popoverMaxHeightByButterFaces is "+this.popoverMaxWidthByBootstrap)}return t.prototype.calculateTooltipPosition=function(t,o){var e=$(window).height()-$(o).offset().top-$(o).outerHeight(),i=$(window).width()-$(o).offset().left-$(o).outerWidth();return console.log("ButterFaces.Tooltip.calculateTooltipPosition - offsetBottom is "+e),console.log("ButterFaces.Tooltip.calculateTooltipPosition - offsetRight is "+i),e position is top or left"),$(o).offset().left position is top"),"top"):(console.log("ButterFaces.Tooltip.calculateTooltipPosition - left offset is NOT smaller than popoverMaxWidthByBootstrap ("+this.popoverMaxWidthByBootstrap+") -> position is left"),"left")):(console.log("ButterFaces.Tooltip.calculateTooltipPosition - offsetRight ("+i+") is greater than popoverMaxWidthByBootstrap ("+this.popoverMaxWidthByBootstrap+") -> position is right"),"right"):(console.log("ButterFaces.Tooltip.calculateTooltipPosition - offsetBottom ("+e+") is greater than popoverMaxHeightByButterFaces ("+this.popoverMaxHeightByButterFaces+") -> position is bottom"),"bottom")},t}();t.Tooltip=o}(ButterFaces||(ButterFaces={}));
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1dHRlcmZhY2VzLXRvb2x0aXAudHMiXSwibmFtZXMiOlsiQnV0dGVyRmFjZXMiLCJUb29sdGlwIiwicG9wb3Zlck1heFdpZHRoQnlCb290c3RyYXAiLCJwb3BvdmVyTWF4SGVpZ2h0QnlCdXR0ZXJGYWNlcyIsInRoaXMiLCJjb25zb2xlIiwibG9nIiwicHJvdG90eXBlIiwiY2FsY3VsYXRlVG9vbHRpcFBvc2l0aW9uIiwicG9wb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