Changeset 16589 for extensions/Autosize/js/Affiche_script.js
- Timestamp:
- Jul 10, 2012, 3:06:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r16579 r16589 145 145 Zone_image = Calcul_Image(nds == "none"); 146 146 147 jQuery("#theImage").width(Zone_image.container.width); 148 jQuery("#theImage").height(Zone_image.image.height + 5); 147 149 148 150 jQuery(theMainImage_obj).width(Zone_image.image.width); 149 151 jQuery(theMainImage_obj).height(Zone_image.image.height); 150 152 151 153 … … 165 167 test_w = window.myPamoorama.autoSlideFx.to; 166 168 test_w = window.myPamoorama.autoScrollFx.to; 169 jQuery("#pamoorama_thumb img").height(47); 167 170 }); 168 171 … … 172 175 test_w = window.myPamoorama.autoSlideFx.to; 173 176 test_w = window.myPamoorama.autoScrollFx.to; 177 jQuery("#pamoorama_thumb img").height(47); 174 178 175 179 }); … … 219 223 //===================================================================== 220 224 jQuery("#infoSwitcher").click(function () { 225 221 226 jQuery("#llgbo").trigger("ON"); 222 227 jQuery("#theImage").css({ textAlign: "center" }); … … 270 275 271 276 wx = parseInt(nw[0]); 272 //wh = parseInt(wx / rapport);277 wh = parseInt(wx / rapport); 273 278 //jQuery("#theImage").css("height", wh + "px"); 274 279 jQuery(theImg).width(wx); 275 //jQuery(theImg).height(wh);280 jQuery(theImg).height(wh); 276 281 } 277 282 } … … 279 284 280 285 }); // fin click #derivativeSwitchBox a 281 //========================================================== 286 282 287 //========================================================================= 283 288 Autosize_init = function (name, value) { … … 313 318 Zone_Affichage = jQuery("#theImage").infos(); 314 319 315 jQuery.c l_cookie('path', cookie_path, { path: cookie_path });316 typeMap = jQuery.c l_cookie('picture_map');317 typeSave = jQuery.c l_cookie('picture_deriv');318 old_img = jQuery.c l_cookie('img');319 old_img_h = jQuery.c l_cookie('img_h');320 old_img_w = jQuery.c l_cookie('img_w');321 old_window_height = jQuery.c l_cookie('window_height');322 old_window_width = jQuery.c l_cookie('window_width');320 jQuery.cookie('path', cookie_path, { path: cookie_path }); 321 typeMap = jQuery.cookie('picture_map'); 322 typeSave = jQuery.cookie('picture_deriv'); 323 old_img = jQuery.cookie('img'); 324 old_img_h = jQuery.cookie('img_h'); 325 old_img_w = jQuery.cookie('img_w'); 326 old_window_height = jQuery.cookie('window_height'); 327 old_window_width = jQuery.cookie('window_width'); 323 328 //============================================================ 324 329 img_init = { height: img_height, width: img_width }; // taille initiale … … 337 342 //=========================================================================== 338 343 Autosize_resize = function (force, parametres) { 339 344 if (typeof rapport == "undefined") return; 340 345 if (force && force == true) old_window.width = 0; 341 346 id_map = jQuery(theMainImage_obj).attr("usemap"); … … 367 372 //============================================================= 368 373 if (Type_Img == "pamoorama") { 369 if (theMainImage_obj == "#pamoorama") {374 theMainImage_obj = "#pamoorama" 370 375 Set_Pamoorama(); 371 } 376 372 377 } 373 378 if (Type_Img == "map") { … … 493 498 img_reelle.height = img_height; 494 499 img_reelle.width = Zone_Affichage.width; 495 if ( myPamoorama) theMainImage_obj = myPamoorama.image;500 if (typeof myPamoorama != "undifened") theMainImage_obj = myPamoorama.image; 496 501 infos_theImage = jQuery("#pamoorama").infos(); 497 502 infos_theImage.height = infos_theImage.height; … … 1085 1090 if (typeof theMainImage_obj != "undefined") { 1086 1091 var theImg = document.getElementById("theMainImage"); 1087 jQuery.c l_cookie('img', theImg.src, cookie_path); // créer un cookie avec une valeur1092 jQuery.cookie('img', theImg.src, cookie_path); // créer un cookie avec une valeur 1088 1093 theImg.useMap = theImg.useMap || "autosize"; 1089 1094 1090 jQuery.c l_cookie('picture_map', theImg.useMap, { path: cookie_path });1091 jQuery.c l_cookie('img_h', jQuery(theMainImage_obj).height(), { path: cookie_path });1092 jQuery.c l_cookie('img_w', jQuery(theMainImage_obj).width(), { path: cookie_path });1095 jQuery.cookie('picture_map', theImg.useMap, { path: cookie_path }); 1096 jQuery.cookie('img_h', jQuery(theMainImage_obj).height(), { path: cookie_path }); 1097 jQuery.cookie('img_w', jQuery(theMainImage_obj).width(), { path: cookie_path }); 1093 1098 1094 1099 if (typeof Window_Affichage != "undefined") { 1095 jQuery.c l_cookie('window_height', Window_Affichage.height, { path: cookie_path });1096 jQuery.c l_cookie('window_width', Window_Affichage.width, { path: cookie_path });1100 jQuery.cookie('window_height', Window_Affichage.height, { path: cookie_path }); 1101 jQuery.cookie('window_width', Window_Affichage.width, { path: cookie_path }); 1097 1102 } 1098 1103 } … … 1207 1212 1208 1213 document.cookie = 'picture_deriv=' + typeSave + ';path="' + cookie_path + '" '; 1209 jQuery.cl_cookie('picture_deriv', typeSave, { path: cookie_path });1210 jQuery.cl_cookie('picture_map', typeMap, { path: cookie_path });1214 jQuery.cookie('picture_deriv', typeSave, { path: cookie_path }); 1215 jQuery.cookie('picture_map', typeMap, { path: cookie_path }); 1211 1216 theImg.src = url; // charge Image 1212 1217 … … 1977 1982 } 1978 1983 1979 jQuery("#pamoorama_inner1").css({1980 "transform": "scale(" + Zoom_pano + ")",1981 "-ms-transform": "scale(" + Zoom_pano + ")", /* IE 9 */1982 "-webkit-transform": "scale(" + Zoom_pano + ")", /* Safari and Chrome */1983 "-o-transform": "scale(" + Zoom_pano + ")", /* Opera */1984 "-moz-transform": "scale(" + Zoom_pano + ")", /* Firefox */1985 "transform-origin": "0 0",1986 "-ms-transform-origin": "0 0", /* IE 9 */1987 "-webkit-transform-origin": "0 0", /* Safari and Chrome */1988 "-moz-transform-origin": "0 0", /* Firefox */1989 "-o-transform-origin": "0 0", /* Opera */1990 "background-size": "100%"1991 });1992 1984 jQuery("#pamoorama_inner").css({ width: new_image.width, height: new_image.height, "background-size": "100%" 1993 1985 }); … … 2011 2003 2012 2004 // jQuery("#pamoorama_thumb").width(200 / Zone_image.zoom); 2013 jQuery("#pamoorama_thumb").css({ "width": "" }); 2005 2014 2006 jQuery("#pamoorama_outter").css({ 2015 2007 … … 2024 2016 }); 2025 2017 2026 2027 jQuery("#pamoorama_thumb").width(200);2028 2018 window.myPamoorama.options.width = Math.ceil(Zone_image.container.width); 2029 2019 //================================================================== … … 2041 2031 window.myPamoorama.imageHeight = new_image.height; 2042 2032 2043 // 200 = new_image.width 2044 thumb_z = (Zone_image.container.width / window.myPamoorama.ratio); 2045 thumb_h = (new_image.height / window.myPamoorama.ratio) * Zoom_pano; 2046 2047 jQuery("#pamoorama_frame").css({ 2048 width: thumb_z + "px" 2049 2050 }); 2051 2052 window.myPamoorama.frame.setStyle('width', thumb_z); 2033 2053 2034 } // test img 2054 2035 } // Set_Pamoorama … … 2079 2060 src_infos_1 = src5; 2080 2061 } 2062 jQuery("#theMainImage").height(jQuery("#theMainImage").width() / rapport); 2063 2081 2064 Zone_image.zoom = (Zone_image.image.height / Zone_image.height_init); 2065 2082 2066 zoom_cl = parseInt(100 * Zone_image.zoom); 2067 zoom_cl = Zone_image.zoom; 2083 2068 jQuery('#zoom ').val(zoom_cl); 2069 2084 2070 zoom_cl = jQuery('#zoom ').val(); 2085 2071 jQuery('#bp_cla').attr('alt', src_info); … … 2218 2204 } 2219 2205 } 2220 retrait_h += (b * 2) 2206 retrait_h += (b * 2) - 5; 2207 retrait_img += 5; 2208 2221 2209 height_theImage = jQuery(window).height() - retrait_h; 2222 2210 width_theImage -= retrait_w; 2223 2211 //=============================================================== 2224 width_theMainImage = width_theImage - retrait_img;2225 height_theMainImage = parseInt(width_theImage / rapport) - (retrait_img);2212 width_theMainImage = (width_theImage - retrait_img); 2213 height_theMainImage = parseInt(width_theImage / rapport); 2226 2214 2227 2215 //=============================================================== … … 2249 2237 height_theImage += (b * 2); 2250 2238 if (height_theImage > height_theMainImage + retrait_h) { 2239 if (Type_Img != "pamoorama") { 2251 2240 height_theImage = height_theMainImage + retrait_h; 2252 2241 } 2242 } 2243 height_theMainImage = width_theMainImage / rapport; 2253 2244 2254 2245 Zone_image = {
Note: See TracChangeset
for help on using the changeset viewer.