1function isTouchEnabled() { 2 return (("ontouchstart" in window) 3 || (navigator.MaxTouchPoints > 0) 4 || (navigator.msMaxTouchPoints > 0)); 5} 6jQuery(function () { 7 jQuery("path[id^=afjs]").each(function (i, e) { 8 afaddEvent( jQuery(e).attr("id")); 9 }); 10}); 11function afaddEvent(id,relationId) { 12 var _obj = jQuery("#" + id); 13 var arr = id.split(""); 14 var _Textobj = jQuery("#" + id + "," + "#afjsvn" + arr.slice(4).join("")); 15 jQuery("#" + ["visnames"]).attr({"fill":afjsconfig.general.visibleNames}); 16 _obj.attr({"fill":afjsconfig[id].upColor, "stroke":afjsconfig.general.borderColor}); 17 _Textobj.attr({"cursor": "default"}); 18 if (afjsconfig[id].active === true) { 19 _Textobj.attr({"cursor": "pointer"}); 20 _Textobj.hover(function () { 21 jQuery("#afjstip").show().html(afjsconfig[id].hover); 22 _obj.css({"fill":afjsconfig[id].overColor}); 23 }, function () { 24 jQuery("#afjstip").hide(); 25 jQuery("#" + id).css({"fill":afjsconfig[id].upColor}); 26 }); 27 if (afjsconfig[id].target !== "none") { 28 _Textobj.mousedown(function () { 29 jQuery("#" + id).css({"fill":afjsconfig[id].downColor}); 30 }); 31 } 32 _Textobj.mouseup(function () { 33 jQuery("#" + id).css({"fill":afjsconfig[id].overColor}); 34 if (afjsconfig[id].target === "new_window") { 35 window.open(afjsconfig[id].url); 36 } else if (afjsconfig[id].target === "same_window") { 37 window.parent.location.href = afjsconfig[id].url; 38 } else if (afjsconfig[id].target === "modal") { 39 jQuery(afjsconfig[id].url).modal("show"); 40 } 41 }); 42 _Textobj.mousemove(function (e) { 43 var x = e.pageX + 10, y = e.pageY + 15; 44 var tipw =jQuery("#afjstip").outerWidth(), tiph =jQuery("#afjstip").outerHeight(), 45 x = (x + tipw >jQuery(document).scrollLeft() +jQuery(window).width())? x - tipw - (20 * 2) : x ; 46 y = (y + tiph >jQuery(document).scrollTop() +jQuery(window).height())? jQuery(document).scrollTop() +jQuery(window).height() - tiph - 10 : y ; 47 jQuery("#afjstip").css({left: x, top: y}); 48 }); 49 if (isTouchEnabled()) { 50 _Textobj.on("touchstart", function (e) { 51 var touch = e.originalEvent.touches[0]; 52 var x = touch.pageX + 10, y = touch.pageY + 15; 53 var tipw =jQuery("#afjstip").outerWidth(), tiph =jQuery("#afjstip").outerHeight(), 54 x = (x + tipw >jQuery(document).scrollLeft() +jQuery(window).width())? x - tipw -(20 * 2) : x ; 55 y =(y + tiph >jQuery(document).scrollTop() +jQuery(window).height())? jQuery(document).scrollTop() +jQuery(window).height() -tiph - 10 : y ; 56 jQuery("#" + id).css({"fill":afjsconfig[id].downColor}); 57 jQuery("#afjstip").show().html(afjsconfig[id].hover); 58 jQuery("#afjstip").css({left: x, top: y}); 59 }); 60 _Textobj.on("touchend", function () { 61 jQuery("#" + id).css({"fill":afjsconfig[id].upColor}); 62 if (afjsconfig[id].target === "new_window") { 63 window.open(afjsconfig[id].url); 64 } else if (afjsconfig[id].target === "same_window") { 65 window.parent.location.href = afjsconfig[id].url; 66 } else if (afjsconfig[id].target === "modal") { 67 jQuery(afjsconfig[id].url).modal("show"); 68 } 69 }); 70 } 71 } 72}
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.