1'use strict'; 2/* 3 * searchRipple - quick launch panel directive 4 */ 5function searchRipple($timeout) { 6 return { 7 restrict: 'EA', 8 link: function(scope, element, attrs) { 9 var ql = angular.element('.header'); 10 element.on('click', function(e) { 11 e.preventDefault(); 12 ql.addClass('overflow-hidden'); 13 var $div = $('.search-effect'); 14 if (!ql.hasClass('search-open')) { 15 var btnRadius = $div.width() / 2, 16 left = $(this).offset().left + btnRadius, 17 top = $(this).offset().top + btnRadius - $(window).scrollTop(); 18 var maxDistHor = (left > $(window).width() / 2) ? left : ($(window).width() - left), 19 maxDistVert = (top > $(window).height() / 2) ? top : ($(window).height() - top); 20 var scale = Math.ceil(Math.sqrt(Math.pow(maxDistHor, 2) + Math.pow(maxDistVert, 2)) / btnRadius); 21 $div.css({ 22 'top': top + 'px', 23 'left': left + 'px', 24 }); 25 $div.velocity({ 26 scale: scale, 27 backgroundColor: '#ffffff', 28 backgroundColorAlpha: 1 29 }, 150, function() { 30 ql.removeClass('overflow-hidden').addClass('search-open'); 31 }); 32 } else if (ql.hasClass('search-open')) { 33 $div.velocity({ 34 scale: 1, 35 backgroundColor: '#ffffff', 36 backgroundColorAlpha: 0, 37 }, 150, function() { 38 ql.removeClass('overflow-hidden').removeClass('search-open'); 39 }); 40 } 41 }); 42 } 43 }; 44} 45angular.module('app').directive('searchRipple', searchRipple);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.