Changeset 19030 for extensions/Autosize/js
- Timestamp:
- Nov 15, 2012, 11:21:22 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r19021 r19030 164 164 //==================================== 165 165 set_cl = function (Valid) { 166 166 167 if (typeof Valid == "undefined") Valid = options.pictureSelType.match(RegExp("Autosize", "gi")) || false; 167 168 if (typeof options.cl_visible == "undefined") return; … … 190 191 191 192 } 193 192 194 if ((typeof Zone_image != "undefined") && typeof Zone_image.image != "undefined") { 193 195 Zone_image.zoom = (Zone_image.image.height / Zone_image.image_init.height); … … 201 203 } 202 204 } 205 if (Type_Img == "pamoorama" || Type_Img == "iframe" || Type_Img == "charlie") { 206 zoom_cl = ""; 207 src_info = ""; 208 src = src2; 209 } 210 203 211 jQuery('#bp_cla').attr('alt', src_info); 204 212 jQuery('#bp_cla').attr('title', src_info); … … 573 581 options.pictureDeriv = pictureDeriv; 574 582 } 575 if (Type_Img == "pamoorama" )583 if (Type_Img == "pamoorama" || Type_Img == "iframe" || Type_Img == "charlie") { 576 584 options.pictureSelType = "Autosize"; 585 } 577 586 for (i = 0; i < options.liste_type.length; i++) { 578 587 options.liste_type[i] = options.liste_type[i].split(","); … … 600 609 601 610 patname = href_path.replace("javascript\:", ""); 611 if(typeof old_path == "undefined") old_path = patname; 602 612 pt = pt.split(","); 603 613 tsz = pt[pt.length - 1]; … … 934 944 935 945 if (Type_Img == "charlie" || Type_Img == "iframe") { 946 init_w1 = Zone_image.image.width; 947 init_h1 = Zone_image.image.height; 948 949 if (pictureSelType_user != "Autosize" && pictureSelType_user != "SelMaxi") { 950 init_w1 = Autosize_options.ideal_size_width; 951 init_h1 = Autosize_options.ideal_size_height; 952 } 936 953 if (Type_Img == "charlie") { 937 954 dp1 = jQuery("#charlie").offset(); … … 941 958 wpng = Math.abs(dp.left - dp1.left) * 2; 942 959 } 943 png_h = jQuery("#" + Type_Img + " div").height(); 944 w01 = Math.ceil(jQuery("#" + "theImage").width() - wpng); 960 png_h = init_h1; 961 w01 = init_w1 - wpng; 962 945 963 jQuery("#" + "theImage").css({ padding: 0 }); 946 964 if (!png_h) { … … 969 987 } 970 988 jQuery("#" + Type_Img).height(png_h); 971 972 973 989 jQuery("#" + Type_Img + " div").width(w01); 974 975 976 990 jQuery("#theImage").css({ height: "auto" }); 977 991 } else { 978 992 jQuery("#theImage").css({ height: "auto" }); 979 993 jQuery("#theMainImage").css({ width: "auto", height: "auto" }); 980 jQuery("#" + Type_Img).attr("width", Zone_image.image.width- (infos_theMainImage.borderwidth.left + infos_theMainImage.borderwidth.right));981 jQuery("#" + Type_Img).attr("height", Zone_image.image.height- (infos_theMainImage.borderwidth.top + infos_theMainImage.borderwidth.bottom));994 jQuery("#" + Type_Img).attr("width", init_w1 - (infos_theMainImage.borderwidth.left + infos_theMainImage.borderwidth.right)); 995 jQuery("#" + Type_Img).attr("height", init_h1 - (infos_theMainImage.borderwidth.top + infos_theMainImage.borderwidth.bottom)); 982 996 } 983 997 jQuery("#" + Type_Img).show(options.fade_in); … … 2244 2258 2245 2259 2246 }); // ready2260 }); // ready 2247 2261 2248 2262
Note: See TracChangeset
for help on using the changeset viewer.