Ignore:
Timestamp:
Jun 15, 2010, 10:46:56 AM (14 years ago)
Author:
vdigital
Message:

Fix: Notice: Undefined index: name in .../plugins/Panoramas/AS_Panorama.php on line 47
Fix: Panorama / Panoramas
Fix: Panoramas are disconnected when picture widths are lower than the viewport width

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Panoramas/template/AS_panorama_content.tpl

    r6527 r6533  
    1313        var s = (100 - {$ASP.speed}) * 2000;
    1414        var p = Math.round(Math.min(Math.max({$ASP.width} * ( {$ASP.start_position} / 100 ), 0), {$ASP.width}));
    15     $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama");
    16         var options = {ldelim}
    17                  viewport_width: w,
    18                  speed: s,
    19                  direction: '{$ASP.direction}',
    20                  control_display: '{$ASP.control_display}',
    21                                  start_position : p,
    22                                  auto_start : {$ASP.auto_start},
    23                                  mode_360 : {$ASP.mode_360},
    24                                  loop_180 : {$ASP.loop_180}
    25          };
    26         $("#theImage img.simple_panorama").panorama(options);
     15        if ({$ASP.width} > w) {ldelim}
     16                $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama");
     17                var options = {ldelim}
     18                                         viewport_width: w,
     19                                         speed: s,
     20                                         direction: '{$ASP.direction}',
     21                                         control_display: '{$ASP.control_display}',
     22                                         start_position : p,
     23                                         auto_start : {$ASP.auto_start},
     24                                         mode_360 : {$ASP.mode_360},
     25                                         loop_180 : {$ASP.loop_180}
     26                         };
     27                $("#theImage img.simple_panorama").panorama(options);
     28        };
    2729});
    2830</script>
    2931{/html_head}
    30         <!-- Adapted simply by the "Panorama" plugin (version {$ASP.Ver}): {$ASP.Dir}/template/AS_panorama_content.tpl -->
     32        <!-- Adapted simply by the "Panoramas" plugin (version {$ASP.Ver}): {$ASP.Dir}/template/AS_panorama_content.tpl -->
    3133        <!-- for: {$ASP.image_name} ({$ASP.width}x{$ASP.height}) -->
    3234        <div id="Panorama">
Note: See TracChangeset for help on using the changeset viewer.