1var HEADER_CENTER_COLGROUP = function(){ 2 var data = {}; 3 var code; 4 var $section, $left_col_group, $center_col_group, $right_col_group; 5 var $window; 6 7 var init = function(c,sd){ 8 if(isBlank(c)) 9 return; 10 code = c; 11 12 $window = $(window); 13 $section = $('#'+code); 14 if($section.length == 0) 15 return; 16 17 if(!$section.hasClass('extend')) 18 return; 19 20 data = sd; 21 if(isBlank(data)) 22 return; 23 24 if(isBlank(data.center_width)) 25 return; 26 27 if(parseInt(data.center_width) == 0) 28 return; 29 30 if(parseInt(data.center_width) > parseInt(data.left_width)) 31 return; 32 33 if(parseInt(data.center_width) > parseInt(data.right_width)) 34 return; 35 36 37 $left_col_group = $section.find('div[data-type=col-group][data-col-group=left]'); 38 $center_col_group = $section.find('div[data-type=col-group][data-col-group=center]'); 39 $right_col_group = $section.find('div[data-type=col-group][data-col-group=right]'); 40 41 if($center_col_group.length == 0) 42 return; 43 44 if(typeof ResizeObserver === 'function'){ 45 var sectionResizeObserver = new ResizeObserver(function(){ 46 resizeCenterColgroup(); 47 }); 48 sectionResizeObserver.observe($section[0]); 49 }else{ 50 $window.off('resize.header_colgroup_'+code).on('resize.header_colgroup_'+code,function(){ 51 resizeCenterColgroup(); 52 }); 53 } 54 resizeCenterColgroup(); 55 56 }; 57 58 var resizeCenterColgroup = function(){ 59 var section_width = $section.find('div[data-type=section]').width(); 60 var left_width = (section_width - parseInt(data.center_width))/2; 61 $left_col_group.width(left_width); 62 $right_col_group.width(left_width); 63 }; 64 return { 65 'init' : function(c,sd){ 66 init(c,sd); 67 } 68 } 69};
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.