/**************************************************** **************************
이름: Highslide JS
버전: 3.1.0(2007년 3월 1일)
저자 : Torstein H鴑si
지원: http://vikjavev.no/highslide/forum
이메일: http://vikjavev.no/megsjol 참조
라이센스:
Highslide JS는 Creative Commons Attribution-NonCommercial 2.5
라이선스(http://creativecommons.org/licenses/by-nc/2.5/)에 따라 라이선스가 부여됩니다.
당신은 무료입니다:
* 저작물을 복사, 배포, 전시, 공연
* 파생 저작물 제작
다음 조건에 따라:
* 저작자 표시.
저작자 또는 라이센스 제공자가 지정한 방식으로 저작물의 저작자를 표시해야 합니다.
* 비영리적. 이 저작물을 상업적인 목적으로 사용할 수 없습니다.
* 모든 재사용 또는 배포의 경우, 귀하는 이 저작물의 라이선스
약관을 다른 사람에게 분명히 밝혀야 합니다.
*
저작권 보유자로부터 허가를 받은 경우 이러한 조건 중 하나라도 포기될 수 있습니다.
귀하의 공정한 사용 및 기타 권리는 위 사항의 영향을 받지 않습니다.
************************************************************************ *******************************/
var hs = {
// 여기에서 자신만의 설정을 적용하거나 html 파일에서 재정의합니다.
graphicsDir : 'highslide/graphics/',
restoreCursor : "zoomout.cur", // 사전 로드에 필요
fullExpandIcon : 'fullexpand.gif',
expandSteps : 10, // 개 단계적으로 확대됩니다. 각 단계는 기간/단계 밀리초 동안 지속됩니다.
expandDuration : 250, // 밀리초
restoreSteps : 10,
restoreDuration : 250,
allowMultipleInstances: true,
hideThumbOnExpand :
captionSlideSpeed : 1, // 설정 0 슬라이드 인 효과를 비활성화하려면
outlineWhileAnimating : 0, // 권장하지 않으며 느린 시스템에서는 애니메이션이 들쭉날쭉해집니다.
outlineStartOffset : 3, // 10에서 끝남
marginLeft : 10,
marginRight : 35, // 스크롤바를 위한 공간 남기기 outline
marginTop : 10,
marginBottom : 35, // 나가기 스크롤바를 위한 공간 개요
zIndexCounter : 1001, // 다른 절대 위치의 요소에 맞게 조정
fullExpandTitle : '放大到实际尺寸'
restoreTitle : '单击可关闭图단편, 本窗口可拖动。使用←→键察看上一图或下一图작품.',
focusTitle : '切换到这幅图picture',
loadingText : 'loading...',
loadingTitle : '点击关闭',
loadingOpacity : 0.75,
showCredits : false , // 원하는 경우 이를 false로 설정할 수 있습니다.
creditsText : 'Powered by Highslide JS',
creditsHref : 'http://vikjavev.no/highslide/?user=1 ',
creditsTitle : 'Highslide JS 홈페이지로 이동',
// 이러한 설정은 각 이미지에 대해 인라인으로 재정의할 수도 있습니다.
앵커: 'auto', /// 이미지가 확장되는 위치
align : 'auto', // 클라이언트 내 위치(앵커 재정의)
captionId : null,
captionTemplateId : null,
slideshowGroup : null, // 다음/이전 링크에 대한 그룹을 정의하고 키 입력
spaceForCaption : 30, // 이미지 아래에 캡션이 있는 공간을 남깁니다.
minWidth: 200,
minHeight: 200,
allowSizeReduction: true, // 이미지가 클라이언트 크기에 맞게 축소되도록 허용합니다. false인 경우 minWidth 및 minHeight
outlineType을 재정의합니다.
// 설정 종료
// 내부 속성 선언
preloadTheseImages : new Array(),
continuePreloading: true,
expandedImagesCounter : 0,
expanders : new Array(),
overrides : new Array(
'anchor',
'align',
'outlineType',
'outlineWhileAnimating',
' spaceForCaption',
'wrapperClassName',
'minWidth',
'minHeight',
'captionId',
'captionTemplateId',
'allowSizeReduction',
' 슬라이드쇼그룹 ',
'enableKeyListener'
),
overlays : new Array(),
toggleImagesGroup : null,
pendingOutlines : new Array(),
// 드래그 기능
ie : (document.all && !window.opera),
safari : navigator.userAgent.indexOf("Safari") != -1,
hasFocused : false,
$ : 함수 (id) {
return document.getElementById(id);
},
푸시 : 함수(arr, val) {
arr[arr.length] = val;
},
createElement : 함수(태그, 속성, 스타일, 상위) {
var el = document.createElement(tag);
if (attribs) hs.setAttribs(el, attribs);
if (styles) hs.setStyles(el, styles);
if (부모) parent.appendChild(el);
반환 엘;
},
setAttribs : 함수 (el, 속성) {
for (var x in 속성) {
el[x] = attribs[x];
}
},
setStyles : 함수 (el, styles) {
for (var x in 스타일) {
시도 { el.style[x] = styles[x ]; }
catch(e) {}
}
},
ieVersion : function () {
arr = navigator.appVersion.split("MSIE");
return parseFloat(arr[1]);
},
clientInfo : function () {
var iebody = (document.compatMode && document.compatMode != "BackCompat")
? document.documentElement : document.body;
this.width = hs.ie ? iebody.clientWidth : self.innerWidth;
this.height = hs.ie ? iebody.clientHeight : self.innerHeight;
this.scrollLeft = hs.ie ? iebody.scrollLeft : pageXOffset;
this.scrollTop = hs.ie ? iebody.scrollTop : pageYOffset;
} ,
위치: 함수(el) {
var parent = el;
var p = 배열();
p.x = parent.offsetLeft;
p.y = parent.offsetTop;
while (parent.offsetParent) {
부모 = parent.offsetParent;
p.x = parent.offsetLeft;
p.y = parent.offsetTop;
}
return p;
},
expand : function(a, params, contentType) {
시도해 보세요 {
new HsExpander(a, params, contentType);
false를 반환합니다.
} catch (e) {
return true;
}
},
focusTopmost : function() {
var topZ = 0;
var topmostKey = -1;
for (i = 0; i if (hs.expanders[i]) {
if (hs.expanders[i].wrapper.style.zIndex && hs.expanders[i].wrapper.style.zIndex > topZ) {
topZ = hs.expanders[i].wrapper.style.zIndex;
topmostKey = i;
}
}
}
if (topmostKey == -1) hs.focusKey = -1;
else hs.expanders[topmostKey].focus();
},
closeId : function(elId) { // for text link
for (i = 0; i if (hs.expanders[i] && (hs.expanders[i].thumb.id == elId || hs.expanders[i].a.id == elId)) {
hs.expanders[i]. doClose();
반품;
}
}
},
close : function(el) {
var key = hs.getWrapperKey(el);
if (hs.expanders[key]) hs.expanders[key].doClose();
false를 반환합니다.
},
toggleImages : function(closeId, expandEl) {
if (closeId) hs.closeId(closeId);
if (hs.ie) expandEl.href = expandEl.href.replace('about:(blank)?', ''); // 신비로운 IE 사물
hs.toggleImagesExpandEl = expandEl;
false를 반환합니다.
},
getAdjacentAnchor : function(key, op) {
var aAr = document.getElementsByTagName('A');
var hsAr = 새 배열;
var activeI = -1;
var j = 0;
for (i = 0; i if (hs.isHsAnchor(aAr[i]) && ((hs.expanders[key].slideshowGroup == hs.getParam(aAr) [i], '슬라이드쇼그룹')))) {
hsAr[j] = aAr[i];
if (hs.expanders[key] && aAr[i] == hs.expanders[key].a) {
activeI = j;
}
j ;
}
}
return hsAr[activeI op];
},
getParam : 함수 (a, param) {
시도 {
var s = a.onclick.toString();
var oneLine = s.replace(/s/g, ' ');
var sParams = oneLine.replace(/.*?hs.(htmlE|e)xpands*?(s*?thiss*?,s*?{(.*?)}.*?$/, '$2 ');
if (hs.safari) { // 멍청한 버그
for (var i = 0; i sParams = sParams.re 장소(hs.재정의 [i] ':', ',' hs.overrides[i] ':').replace(/^s*?,/, '')
}
}
if (oneLine = = sParams) return null
eval('var arr = {' sParams '};');
for(var x in arr) {
if (x == param) return arr[x] ;
}
} catch (e) {
return null;
}
},
getSrc : function (a) var src = hs. getParam(a, 'src')
if (src) return src; 🎜>
previousOrNext : 함수 (el, op) {
if (typeof el == 'object') var activeKey = hs.getWrapperKey(el)
else (typeof el == 'number'; ) var activeKey = el;
if (hs.expanders[activeKey]) {
hs.toggleImagesExpandEl = hs.getAdjacentAnchor(activeKey, op);
hs.expanders[activeKey].doClose();
}
false를 반환합니다.
},
previous : function (el) {
return hs.previousOrNext(el, -1);
},
next : function (el) {
return hs.previousOrNext(el, 1);
},
keyHandler : function(e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // 즉
if (e.target.form) return; // 양식 요소에 포커스가 있음
var op = null;
스위치(e.keyCode) {
case 34: // Page Down
case 39: // 오른쪽 화살표
case 40: / 왼쪽 화살표
op = 1;
휴식;
case 33: // Page Up
case 37: //왼쪽 화살표
case 38: //아래 화살표
op = -1;
휴식;
case 27: // Escape
case 13: // Enter
if (hs.expanders[hs.focusKey]) hs.expanders[hs.focusKey].doClose();
false를 반환합니다.
}
if (op != null) {
hs.removeEventListener(document, 'keydown', hs.keyHandler);
if (hs.expanders[hs.focusKey] && !hs.expanders[hs.focusKey].enableKeyListener) true를 반환합니다.
return hs.previousOrNext(hs.focusKey, op);
}
그렇지 않으면 true를 반환합니다.
},
registerOverlay : 함수 (오버레이) {
hs.push(hs.overlays, overlay);
},
getWrapperKey : 함수 (el) {
var key = -1;
동안(el.parentNode) {
el = el.parentNode;
if (el.id && el.id.match(/^highslide-wrapper-[0-9] $/)) {
key = el.id.replace(/^highslide-wrapper-([ 0-9] )$/, '$1');
휴식;
}
}
return 키;
},
cleanUp : function () {
if (hs.toggleImagesExpandEl) {
hs.toggleImagesExpandEl.onclick();
hs.toggleImagesExpandEl = null;
} else {
for (i = 0; i if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost ();
}
}
},
mouseClickHandler : function(e)
{
if (!e) e = window.event;
if (e.button > 1) true를 반환합니다.
if (!e.target) e.target = e.srcElement;
var fobj = e.target;
while (fobj.parentNode
&& !(fobj.className && fobj.className.match(/highslide-(image|move|html)/)))
{
fobj = fobj.parentNode;
}
if (!fobj.parentNode) return;
hs.dragKey = hs.getWrapperKey(fobj);
if (fobj.className.match(/highslide-(image|move)/)) {
var isDraggable = true;
var wLeft = parseInt(hs.expanders[hs.dragKey].wrapper.style.left);
var wTop = parseInt(hs.expanders[hs.dragKey].wrapper.style.top);
}
if (e.type == 'mousedown') {
if (isDraggable) // 드래그 또는 포커스
{
hs.dragObj = h s.expanders[hs .dragKey].content;
if (fobj.className.match('highslide-image')) hs.dragObj.style.cursor = '이동';
hs.leftBeforeDrag = wLeft;
hs.topBeforeDrag = wTop;
hs.dragX = e.clientX;
hs.dragY = e.clientY;
hs.addEventListener(document, 'mousemove', hs.mouseMoveHandler);
if (e.preventDefault) e.preventDefault(); // FF
if (hs.dragObj.className.match(/highslide-(image|html)-blur/)) {
hs.expanders[hs.dragKey].focus();
hs.hasFocused = true;
}
false를 반환합니다.
}
else if (fobj.className.match(/highslide-html/)) { // 그냥 초점
hs.expanders[hs.dragKey].focus();
hs.expanders[hs.dragKey].redoShowHide();
hs.hasFocused = false; // 왜??
}
} else if (e.type == 'mouseup') {
hs.removeEventListener(document, 'mousemove', hs.mouseMoveHandler);
if (isDraggable && hs.expanders[hs.dragKey]) {
if (fobj.className.match('highslide-image')) {
fobj.style.cursor = hs.styleRe 상점커서;
}
var hasMoved = wLeft != hs.leftBeforeDrag || wTop != hs.topBeforeDrag;
if (!hasMoved && !hs.hasFocused && !fobj.className.match(/highslide-move/)) {
hs.expanders[hs.dragKey].doClose();
} else if (hasMoved || (!hasMoved && hs.hasHtmlExpanders)) {
hs.expanders[hs.dragKey].redoShowHide();
}
hs.hasFocused = false;
} else if(fobj.className.match('highslide-image-blur')) {
fobj.style.cursor = hs.styleRestoreCursor;
}
}
},
mouseMoveHandler : function(e)
{
if (!hs.expanders[hs.dragKey] || !hs.expanders[ hs.dragKey].wrapper) return;
if (!e) e = window.event;
var exp = hs.expanders[hs.dragKey];
var w = exp.wrapper;
w.style.left = hs.leftBeforeDrag e.clientX - hs.dragX 'px';
w.style.top = hs.topBeforeDrag e.clientY - hs.dragY 'px';
if (exp.objOutline) {
var o = exp.objOutline;
o.outer.style.left = (parseInt(w.style.left) - o.offset) 'px';
o.outer.style.top = (parseInt(w.style.top) - o.offset) 'px';
}
false를 반환합니다.
},
addEventListener : 함수 (el, event, func) {
if (document.addEventListener) el.addEventListener(event, func, false);
else if (document.attachEvent) el.attachEvent('on' event, func);
else el[event] = func;
},
removeEventListener : 함수 (el, event, func) {
if (document.removeEventListener) el.removeEventListener(event, func, false);
else if (document.detachEvent) el.detachEvent('on' event, func);
else el[event] = null;
},
isHsAnchor : 함수 (a) {
return (a.className &&(a.className.match("highslide$") || a.className.match("highslide " )));
},
preloadFullImage : 함수 (i) {
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != '정의되지 않음 ') {
var img = document.createElement('img');
img.onload = function() { hs.preloadFullImage(i 1); };
img.src = hs.preloadTheseImages[i];
}
},
preloadImages : 함수 (숫자) {
if (숫자) this.numberOfImagesToPreload = 숫자;
var j = 0;
var aTags = document.getElementsByTagName('A');
for (i = 0; i a = aTags[i];
if (hs.isHsAnchor(a)) {
if (j hs.preloadTheseImages[j] = hs.getSrc(a);
j ;
}
}
}
// 아웃라인 미리 로드
new HsOutline(hs.outlineType, function () { hs.preloadFullImage(0)} );
// 커서 미리 로드
var cur = document.createElement('img');
cur.src = hs.graphicsDir hs.restoreCursor;
},
genContainer : function () {
if (!hs.container) {
hs.container = hs.createElement('div',
null, { 위치: 'absolute', 왼쪽: 0, 상단: 0, 너비: '100%', zIndex: hs.zIndexCounter },
document.body
);
}
}
}; // hs 개체 종료
//-------------------------------------- --------------
HsOutline = 함수(outlineType, onLoad ) {
if (!outlineType) return;
if (onLoad) this.onLoad = onLoad;
this.outlineType = outlineType;
this.outline = new Array();
var v = hs.ieVersion();
hs.genContainer();
this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v this.hasPngSupport = !hs.ie || (hs.ie && v >= 8); this.hasOutline = this.outlineType && (this.hasAlphaImageLoader || this.hasPngSupport);
this.outer = hs.createElement(
'table',
{
cellSpacing: 0 // saf
}, {
가시성: '숨김 ',
위치: '절대',
zIndex: hs.zIndexCounter ,
borderCollapse: 'collapse'
}, 컨테이너
);
this.tbody = hs.createElement('tbody', null, null, this.outer);
this.preloadOutlineElement(1); // 재귀
};
HsOutline.prototype.preloadOutlineElement = function (i) {
if (this.outline[i] && this.outline[i].onload) { // Gecko 여러 온로드 버그
이. 개요[i].onload = null;
반품;
}
this.offset = this.hasOutline ? 10 : 0;
if (i == 1 || i == 4 || i == 6) this.tr = hs.createElement('tr', null, null, this.tbody);
if (i == 5) this.inner = hs.createElement('td', null, { padding: 0, margin: 0, border: 0, position: 'relative' }, this.tr);
var files = 배열(0,8,1,2,7,3,6,5,4);
var src = hs.graphicsDir "outlines/" this.outlineType "/" files[i] ".png";
if (this.hasAlphaImageLoader) {
var bgKey = 'filter';
var bgValue = "progid:DXImageTransform.Microsoft.AlphaImageLoader("
"enabled=true, sizingMethod=scale src='" src "') ";
} else if (this.hasPngSupport || this.hasIe7Bug) {
var bgKey = '배경';
var bgValue = 'url(' src ')';
}
var styles = { lineHeight: 0, fontSize: 0, padding: 0, margin: 0, border: 0 };
if (this.hasOutline) styles[bgKey] = bgValue;
var td = hs.createElement('td', null, styles);
var img = hs.createElement('img', null, { visibility: 'hidden', display: 'block' }, td); // onload 트리거
var dim = 2 * this.offset;
hs.setStyles (td, { 높이: dim 'px', 너비: dim 'px'} );
var pThis = this;
if (i else img.onload = function() {
hs.pendingOutlines[pThis.outlineType] = pThis;
if (pThis.onLoad) pThis.onLoad();
};
this.tr.appendChild(td);
if (this.hasOutline) img.src = src;
else img.onload();
};
HsOutline.prototype.destroy = function() {
this.outer.parentNode.removeChild(this.outer);
};
//-------------------------------------------- ----------------------
// 확장 개체
HsExpander = 함수( a, params, contentType) {
hs.continuePreloading = false;
// 인라인 매개변수 재정의
for (i = 0; i var name = hs.overrides[i];
if (params && typeof params[이름] != '정의되지 않음') this[이름] = params[이름];
else this[이름] = hs[이름];
}
if (params && params.thumbnailId) {
var el = hs.$(params.thumbnailId);
} else { // 앵커 내의 첫 번째 img
for (i = 0; i if (a.childNodes[i].tagName && a .childNodes[i].tagName == 'IMG') {
var el = a.childNodes[i];
휴식;
}
}
}
if (!el) el = a;
// 기타 취소
for (i = 0; i if (hs.expanders[i]&& hs.expanders[i ].thumb != el && !hs.expanders[i].onLoadStarted) {
hs.expanders[i].cancelLoading();
}
}
// 이미 열려 있는지 확인하세요
for (i = 0; i if (hs.expanders[i] && hs.expanders[i].thumb = = el) {
hs.expanders[i].focus();
false를 반환합니다.
}
else if (hs.expanders[i] && !hs.allowMultipleInstances) {
hs.expanders[i].doClose();
}
}
this.key = hs.expandedImagesCounter ;
hs.expanders[this.key] = 이;
if (contentType == 'html') {
this.isHtml = true;
this.contentType = 'html';
} else {
this.isImage = true;
this.contentType = '이미지';
}
this.a = a;
this.thumbsUserSetId = el.id || 지원;
this.thumb = el;
this.overlays = new Array();
var pos = hs.position(el);
// 래퍼 인스턴스화
this.wrapper = hs.createElement(
'div',
{
id: 'highslide-wrapper-' this.key, 🎜 > className: this.wrapperClassName
},
{
가시성: '숨김',
위치: }
);
// 썸네일의 속성 저장
this.thumbWidth = el.width ? el.width : el.offsetWidth;
this.thumbHeight = el.height ? el.height: el.offsetHeight;
this.thumbLeft = pos.x;
this.thumbTop = pos.y;
this.thumbClass = el.className;
// 엄지 테두리
this.thumbOffsetBorderW = (this.thumb.offsetWidth - this.thumbWidth) / 2;
this.thumbOffsetBorderH = (this.thumb.offsetHeight - this.thumbHeight) / 2;
// 래퍼 가져오기
if (hs.pendingOutlines[this.outlineType]) {
this.connectOutline();
this[this.contentType '만들기']();
} else if (!this.outlineType) {
hs.genContainer();
this[this.contentType '만들기']();
} else {
this.displayLoading();
var pThis = this; }
);
}
};
HsExpander.prototype.connectOutline = function(x, y) {
var w = hs.pendingOutlines[this.outlineType];
this.objOutline = w;
hs.pendingOutlines[this.outlineType] = null;
};
HsExpander.prototype.displayLoading = function() {
if (this.onLoadStarted || this.loading) return;
this.originalCursor = this.a.style.cursor;
this.a.style.cursor = '기다려';
if (!hs.loading) {
hs.loading = hs.createElement('a',
{
className: 'highslide-loading',
제목: hs .loadingTitle,
innerHTML: hs.loadingText
{
위치:
}, hs.container
);
if (hs.ie) hs.loading.style.filter = 'alpha(opacity=' (100*hs.loadingOpacity) ')';
else hs.loading.style.opacity = hs.loadingOpacity;
}
this.loading = hs.loading;
this.loading.href = 'javascript:hs.expanders[' this.key '].cancelLoading()';
this.loading.visibility = '표시';
this.loading.style.left = (this.thumbLeft this.thumbOffsetBorderW
(this.thumbWidth - this.loading.offsetWidth) / 2) 'px';
this.loading.style.top = (this.thumbTop
(this.thumbHeight - this.loading.offsetHeight) / 2) 'px';
setTimeout(
"if (hs.expanders[" this.key "] && hs.expanders[" this.key "].loading) "
"hs.expanders[" this.key "] .loading.style.visibility = 'visible';",
100
);
};
HsExpander.prototype.imageCreate = function() {
var img = document.createElement('img');
var key = this.key;
var img = document.createElement('img');
this.content = img;
img.onload = function () { if (hs.expanders[key]) hs.expanders[key].onLoad(); };
img.className = 'highslide-image' this.thumbClass;
img.style.visibility = '숨김'; // IE
에서 깜박임을 방지합니다.
img.style.display = 'block';
img.style.position = '절대';
img.style.zIndex = 3;
img.title = hs.restoreTitle;
img.onmouseover = function () {
if (hs.expanders[key]) hs.expanders[key].onMouseOver();
};
img.onmouseout = 기능 (e) {
var rel = e ? e.관련Target : event.toElement;
if (hs.expanders[key]) hs.expanders[key].onMouseOut(rel);
};
if (hs.safari) hs.container.appendChild(img);
img.src = hs.getSrc(this.a);
this.displayLoading();
};
HsExpander.prototype.onLoad = function() {
시도해 보세요 {
if (!this.content) return;
if (this.onLoadStarted) 반환; // 오래된 Gecko 루프
else this.onLoadStarted = true;
if (this.loading) {
this.loading.style.visibility = '숨김';
this.loading = null;
this.a.style.cursor = this.originalCursor || '';
}
if (this.isImage) {
this.newWidth = this.content.width;
this.newHeight = this.content.height;
this.fullExpandWidth = this.newWidth;
this.fullExpandHeight = this.newHeight;
this.content.width = this.thumbWidth;
this.content.height = this.thumbHeight; }
//캡션 div 식별
var modMarginBottom = hs.marginBottom;
if (!this.captionId && this.thumbsUserSetId) this.captionId = 'caption-for-' this.thumbsUserSetId;
if (this.captionId && (hs.$(this.captionId) || hs.$(this.captionId '-taken'))) {
this.origCaption = hs.$(this.captionId ' -촬영') ? hs.$(this.captionId '-taken') : hs.$(this.captionId);
this.caption = this.origCaption.cloneNode(1);
modMarginBottom = this.spaceForCaption;
if (!hs.$(this.captionId '-taken')) this.origCaption.id = this.captionId '-taken';
if (!hs.$(this.captionId)) this.caption.id = this.captionId;
else this.caption.id = null;
if (this.captionTemplateId && hs.$(this.captionTemplateId)) {
this.origCapTpl = hs.$(this.captionTemplateId);
this.capTpl = this.origCapTpl.cloneNode(1);
this.capTpl.innerHTML
= this.capTpl.innerHTML.replace(/s/g, ' ').replace('{caption}', this.caption.innerHTML);
this.caption = this.capTpl;
}
}
this.wrapper.appendChild(this.content);
this.content.style.position = '상대적'; // 안녕하세요
if (this.caption) this.wrapper.appendChild(this.caption);
this.wrapper.style.left = this.thumbLeft 'px';
this.wrapper.style.top = this.thumbTop 'px';
hs.container.appendChild(this.wrapper);
// 테두리에 적합
this.offsetBorderW = (this.content.offsetWidth - this.thumbWidth) / 2;
this.offsetBorderH = (this.content.offsetHeight - this.thumbHeight) / 2;
var modMarginRight = hs.marginRight 2 * this.offsetBorderW;
modMarginBottom = 2 * this.offsetBorderH;
var ratio = this.newWidth / this.newHeight;
var minWidth = this.allowSizeReduction ? this.minWidth : this.newWidth;
var minHeight = this.allowSizeReduction ? this.minHeight : this.newHeight;
var 정렬 = { x: 'auto', y: 'auto' };
if (this.align == 'center') {
justify.x = 'center';
justify.y = '중앙';
} else {
if (this.anchor.match(/^top/)) justify.y = null;
if (this.anchor.match(/right$/)) justify.x = 'max';
if (this.anchor.match(/^bottom/)) justify.y = 'max';
if (this.anchor.match(/left$/)) justify.x = null;
}
클라이언트 = new hs.clientInfo();
// 정당화
this.x = {
min: parseInt(this.thumbLeft) - this.offsetBorderW this.thumbOffsetBorderW, 범위: this.newWidth,
minSpan: this.newWidth justify: justify.x, marginMin: hs.marginLeft,
marginMax:
sc, 롤: client.scrollLeft,
clientSpan: client.width,
thumbSpan: this.thumbWidth
};
var oldRight = this.x.min parseInt(this.thumbWidth);
this.x = this.justify(this.x);
this.y = {
min: parseInt(this.thumbTop) - this.offsetBorderH this.thumbOffsetBorderH,
span:
minSpan: this.newHeight justify: justify.y, marginMin: hs.marginTop,
marginMax: modMarginBottom, 스크롤 : client.scrollTop,
clientSpan: client.height,
thumbSpan: this.thumbHeight
};
var oldBottom = this.y.min parseInt(this.thumbHeight);
this.y = this.justify(this.y);
if (this.isHtml) this.htmlSizeOperations();
if (this.isImage) this.correntRatio(ratio);
var x = this.x;
var y = this.y;
// 선택 상자 버그
var imgPos = {x: x.min - 20, y: y.min - 20, w: x.span 40, h: y.span 40 this.spaceForCaption};
hs.hideSelects = (hs.ie && hs.ieVersion() if (hs.hideSelects) this.showHideElements('SELECT', 'hidden', imgPos);
// Iframes 버그
hs.hideIframes = (window.opera || navigator.vendor == 'KDE' || (hs.ie && hs.ieVersion() if (hs.hideIframes) this.showHideElements('IFRAME', 'hidden', imgPos);
// 개요를 준비하세요
if (this.objOutline && !this.outlineWhileAnimating) this.positionOutline(x.min, y.min, x.span, y.span);
var o2 = this.objOutline ? this.objOutline.offset : 0;
// 크기 변경 적용
this.changeSize(
1,
this.thumbLeft this.thumbOffsetBorderW - this.offsetB orderW,
this.thumbTop this.thumbOffsetBorderH - this.offsetBorderH ,
this.thumbWidth,
this.thumbHeight,
x.min,
y.min,

웹 개발에서 JavaScript의 주요 용도에는 클라이언트 상호 작용, 양식 검증 및 비동기 통신이 포함됩니다. 1) DOM 운영을 통한 동적 컨텐츠 업데이트 및 사용자 상호 작용; 2) 사용자가 사용자 경험을 향상시키기 위해 데이터를 제출하기 전에 클라이언트 확인이 수행됩니다. 3) 서버와의 진실한 통신은 Ajax 기술을 통해 달성됩니다.

보다 효율적인 코드를 작성하고 성능 병목 현상 및 최적화 전략을 이해하는 데 도움이되기 때문에 JavaScript 엔진이 내부적으로 작동하는 방식을 이해하는 것은 개발자에게 중요합니다. 1) 엔진의 워크 플로에는 구문 분석, 컴파일 및 실행; 2) 실행 프로세스 중에 엔진은 인라인 캐시 및 숨겨진 클래스와 같은 동적 최적화를 수행합니다. 3) 모범 사례에는 글로벌 변수를 피하고 루프 최적화, Const 및 Lets 사용 및 과도한 폐쇄 사용을 피하는 것이 포함됩니다.

Python은 부드러운 학습 곡선과 간결한 구문으로 초보자에게 더 적합합니다. JavaScript는 가파른 학습 곡선과 유연한 구문으로 프론트 엔드 개발에 적합합니다. 1. Python Syntax는 직관적이며 데이터 과학 및 백엔드 개발에 적합합니다. 2. JavaScript는 유연하며 프론트 엔드 및 서버 측 프로그래밍에서 널리 사용됩니다.

Python과 JavaScript는 커뮤니티, 라이브러리 및 리소스 측면에서 고유 한 장점과 단점이 있습니다. 1) Python 커뮤니티는 친절하고 초보자에게 적합하지만 프론트 엔드 개발 리소스는 JavaScript만큼 풍부하지 않습니다. 2) Python은 데이터 과학 및 기계 학습 라이브러리에서 강력하며 JavaScript는 프론트 엔드 개발 라이브러리 및 프레임 워크에서 더 좋습니다. 3) 둘 다 풍부한 학습 리소스를 가지고 있지만 Python은 공식 문서로 시작하는 데 적합하지만 JavaScript는 MDNWebDocs에서 더 좋습니다. 선택은 프로젝트 요구와 개인적인 이익을 기반으로해야합니다.

C/C에서 JavaScript로 전환하려면 동적 타이핑, 쓰레기 수집 및 비동기 프로그래밍으로 적응해야합니다. 1) C/C는 수동 메모리 관리가 필요한 정적으로 입력 한 언어이며 JavaScript는 동적으로 입력하고 쓰레기 수집이 자동으로 처리됩니다. 2) C/C를 기계 코드로 컴파일 해야하는 반면 JavaScript는 해석 된 언어입니다. 3) JavaScript는 폐쇄, 프로토 타입 체인 및 약속과 같은 개념을 소개하여 유연성과 비동기 프로그래밍 기능을 향상시킵니다.

각각의 엔진의 구현 원리 및 최적화 전략이 다르기 때문에 JavaScript 엔진은 JavaScript 코드를 구문 분석하고 실행할 때 다른 영향을 미칩니다. 1. 어휘 분석 : 소스 코드를 어휘 단위로 변환합니다. 2. 문법 분석 : 추상 구문 트리를 생성합니다. 3. 최적화 및 컴파일 : JIT 컴파일러를 통해 기계 코드를 생성합니다. 4. 실행 : 기계 코드를 실행하십시오. V8 엔진은 즉각적인 컴파일 및 숨겨진 클래스를 통해 최적화하여 Spidermonkey는 유형 추론 시스템을 사용하여 동일한 코드에서 성능이 다른 성능을 제공합니다.

실제 세계에서 JavaScript의 응용 프로그램에는 서버 측 프로그래밍, 모바일 애플리케이션 개발 및 사물 인터넷 제어가 포함됩니다. 1. 서버 측 프로그래밍은 Node.js를 통해 실현되며 동시 요청 처리에 적합합니다. 2. 모바일 애플리케이션 개발은 재교육을 통해 수행되며 크로스 플랫폼 배포를 지원합니다. 3. Johnny-Five 라이브러리를 통한 IoT 장치 제어에 사용되며 하드웨어 상호 작용에 적합합니다.

일상적인 기술 도구를 사용하여 기능적 다중 테넌트 SaaS 응용 프로그램 (Edtech 앱)을 구축했으며 동일한 작업을 수행 할 수 있습니다. 먼저, 다중 테넌트 SaaS 응용 프로그램은 무엇입니까? 멀티 테넌트 SAAS 응용 프로그램은 노래에서 여러 고객에게 서비스를 제공 할 수 있습니다.


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

MinGW - Windows용 미니멀리스트 GNU
이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

WebStorm Mac 버전
유용한 JavaScript 개발 도구

Dreamweaver Mac版
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)
