PageSourceSearch

https://www.newsis.com/assets/js/crop.js?pb=202109011315

js newsis.com collected 2026-09-24 08:38:40 UTC 1,815 bytes, 58 lines download raw bytes

1
2/* 이미지 크롭 */
3
4Master = {
5		imgCropEvt : function(conEl,findImg,limitW,limitH) {
6			var $cropName = $(conEl); //크롭 컨텐츠 선택자
7			var $findImgName = findImg; // 이미지 컨텐츠
8			var $limitW = limitW; //제한 width
9			var $limitH = limitH; //제한 height
10			function imgWidth(){
11				$cropName.find($findImgName).each(function(i){
12					var imgW = $(this).width();
13					var imgH = $(this).height();
14					var moveL = -(imgW-limitW)/2
15					//가로 이미지 일때
16					if(imgW >= imgH){
17						if(limitH <= imgH){
18							//썸네일 사이즈보다 이미지가 클 경우 - 가운데 정렬
19							$(this).addClass('colW').css('margin-left',Math.round(moveL));
20						}else{
21							//썸네일 사이즈보다 이미지가 작을 경우 - 높이 기준 늘림
22							$(this).addClass('colW').css('height','100%');
23						}
24					}
25					// 세로 이미지 일때 (넓이 기준 크롭)
26					else if(imgW < imgH){
27						$(this).addClass('rowH').css('width','100%');
28					}
29					//console.log(imgW, imgH, i, $cropName);
30				});
31			}
32
33			$cropName.find($findImgName).each(function(){
34				var $cropW = $(this).width();
35				var $cropH = $(this).height();
36				if($cropW > $cropH){
37					//가로 이미지 일때
38					imgWidth();
39				}
40			});
41		},
42
43		imgCropEvt02 : function(conEl,findImg,limitW,limitH) {
44			$(conEl).find(findImg).each(function(){
45				var imgW = $(this).width();
46				var imgH = $(this).height();
47				var moveL = -(imgW-limitW)/2
48				//console.log(imgW, imgH, moveL);
49				//가로 이미지 일때
50				if(imgW > limitW){
51					//썸네일 사이즈보다 이미지가 클 경우 - 가운데 정렬
52					$(this).addClass('colW').css('margin-left',Math.round(moveL));
53					//console.log(imgW, imgH, moveL);
54				}
55			});
56		}
57
58	}

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.