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