Sha256: eba1cf7b6ae7d1c97de176a0128d5143bc41ab2486ad514f335bf4397912cbb5
Contents?: true
Size: 1.97 KB
Versions: 16
Compression:
Stored size: 1.97 KB
Contents
/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v0.7.0-rc3 */ !function(){"use strict";function e(e,t,i,o,n,a,d){function l(l,u,s){function m(t){m.value=!!t,m.queued||(t?(m.queued=!0,e(function(){l.visible=m.value,m.queued=!1},l.delay)):e(function(){l.visible=!1}))}function f(){u.removeClass("md-hide"),v.attr("aria-describedby",u.attr("id")),g.append(u),p(),i(function(){i(function(){p(),l.visible&&u.addClass("md-show")})})}function h(){u.removeClass("md-show").addClass("md-hide"),v.removeAttr("aria-describedby"),e(function(){l.visible||u.detach()},200,!1)}function p(){var e=n.elementRect(u,g),t=n.elementRect(v,g),i="bottom",o={left:t.left+t.width/2-e.width/2,top:t.top+t.height};o.left=Math.min(o.left,g.prop("scrollWidth")-e.width-c),o.left=Math.max(o.left,c),o.top+e.height>g.prop("scrollHeight")&&(o.top=t.top-e.height,i="top"),u.css({top:o.top+"px",left:o.left+"px"}),u.attr("width-32",Math.ceil(e.width/32)),u.attr("md-direction",i)}a(u);for(var v=u.parent(),b=u.parent()[0];b&&b!==d[0]&&b!==document.body&&(!b.tagName||"md-content"!=b.tagName.toLowerCase());)b=b.parentNode;var g=angular.element(b||document.body);angular.isDefined(s.mdDelay)||(l.delay=r),u.detach(),u.attr("role","tooltip"),u.attr("id",s.id||"tooltip_"+n.nextUid()),v.on("focus mouseenter touchstart",function(){m(!0)}),v.on("blur mouseleave touchend touchcancel",function(){o[0].activeElement!==v[0]&&m(!1)}),l.$watch("visible",function(e){e?f():h()});var $=i.debounce(function(){l.visible&&p()});angular.element(t).on("resize",$),l.$on("$destroy",function(){l.visible=!1,u.remove(),angular.element(t).off("resize",$)})}var r=400,c=8;return{restrict:"E",transclude:!0,template:'<div class="md-background"></div><div class="md-content" ng-transclude></div>',scope:{visible:"=?mdVisible",delay:"=?mdDelay"},link:l}}angular.module("material.components.tooltip",["material.core"]).directive("mdTooltip",e),e.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement"]}();
Version data entries
16 entries across 16 versions & 1 rubygems