Changeset 17407 for extensions/stripped/js/scripts-tpp.js
- Timestamp:
- Aug 5, 2012, 4:51:13 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/stripped/js/scripts-tpp.js
r14310 r17407 174 174 var marge_cote; 175 175 176 if (ImageCadre.length == 0) {177 ImageContainer.css("opacity","1");178 jQuery("img","#theImageAndTitle").css("opacity","1");179 return;180 }181 182 if (options.navArrows) {marge_cote=30;} else {marge_cote=10;};183 184 176 var marge_sup = 5 + Content.offset().top; 185 177 var marge_inf; 186 178 if (options.themeStyle == 'original') { marge_inf = options.imageAutosizeMargin+10;} else { marge_inf = 30;}; 187 179 var marge_spec = 0; 180 181 if (ImageCadre.length == 0) { 182 ImageContainer.css("opacity","1"); 183 jQuery("img","#theImageAndTitle").css("opacity","1"); 184 ImageContainer.css("top",marge_sup+"px"); 185 //maps & earth 186 if (jQuery("#map").length == 1) { 187 ImageContainer.css("position","static"); 188 ImageContainer.css("margin-top","10px"); 189 } 190 return; 191 } 188 192 189 193 var slideshow=jQuery("#light_slideshow"); … … 361 365 { 362 366 p = new Object(); 367 imgH = jQuery(document).data("highHeight") 368 imgW = jQuery(document).data("highWidth") 363 369 364 370 if(zoom=='full') … … 369 375 p.top=options.marginContainer; 370 376 371 if(p.width> jQuery(document).data("highWidth"))372 { 373 p.width = jQuery(document).data("highWidth")-options.paddingContainer*2;377 if(p.width>imgW) 378 { 379 p.width = imgW; 374 380 p.left = (jQuery("html").get(0).clientWidth-p.width)/2; 375 } 376 377 if(p.height>jQuery(document).data("highHeight")) 378 { 379 p.height = jQuery(document).data("highHeight")-options.paddingContainer*2; 381 jQuery("#theImgHighZoomButton").hide(); 382 } 383 384 if(p.height>imgH) 385 { 386 p.height = imgH; 380 387 p.top = (jQuery("html").get(0).clientHeight-p.height)/2; 381 } 388 jQuery("#theImgHighZoomButton").hide(); 389 } 390 391 if ((p.width==imgW) && (p.height==imgH)) switchZoomHigh(); 382 392 } 383 393 else 384 394 { 385 395 //zoom = 'fit' 386 ratioImg = jQuery(document).data("highWidth") / jQuery(document).data("highHeight");396 ratioImg = imgW / imgH; 387 397 ratioPage = jQuery("html").get(0).clientWidth / jQuery("html").get(0).clientHeight; 388 398 … … 398 408 p.height = p.width/ratioImg; 399 409 } 410 411 if ((p.width > imgW) || (p.height > imgH)) { 412 p.height = imgH; 413 p.width = imgW; 414 jQuery("#theImgHighZoomButton").hide(); 415 } 400 416 p.left = (jQuery("html").get(0).clientWidth-p.width)/2; 401 417 p.top = (jQuery("html").get(0).clientHeight-p.height)/2;
Note: See TracChangeset
for help on using the changeset viewer.