【发布时间】:2015-02-13 02:20:12
【问题描述】:
我正在使用 JQuery 插件 Smooth Zoom Pan 和 PrettyPhoto:
http://codecanyon.net/item/smooth-zoom-pan-jquery-image-viewer/511142
这与 2014 年开发人员在 smoothzoom 中合并的 PrettyPhoto 功能配合得很好。现在我想添加包含在 smoothzoom 功能中的地标。但是,示例和文档不包括在使用 PrettyPhoto 时添加地标。
smoothzoom 的初始化如下:
$('#yourImageID').smoothZoom({
width: 512,
height: 384,
pan_BUTTONS_SHOW: "NO",
pan_LIMIT_BOUNDARY: "NO",
button_SIZE: 24,
button_ALIGN: "top right",
zoom_MAX: 200,
border_TRANSPARENCY: 20,
container: 'zoom_container',
/******************************************
Enable Responsive settings below if needed.
Max width and height values are optional.
******************************************/
responsive: false,
responsive_maintain_ratio: true,
max_WIDTH: '',
max_HEIGHT: '',
});
});
但是,使用 PrettyPhoto 的 SmoothZoom 就像下面的代码一样,它似乎不适用于地标,并且缩放容器不是一个选项,因为它在上面的代码中。
$(".zoom a[rel^='prettyPhoto'], .zoom_thumb a[rel^='prettyPhoto']").prettyPhoto({
default_width: canvasWidth,
default_height: canvasHeight,
autoplay_slideshow: false,
opacity: 0.70,
theme: 'pp_default',
modal: true,
overlay_gallery: false,
changepicturecallback: setZoom,
callback: closeZoom,
social_tools: false,
image_markup: '<div style="width:' + canvasWidth + 'px; height:' + canvasHeight + 'px;"><img id="fullResImage" src="{path}" /></div>',
fixed_size: true,
responsive: false,
allow_expand: false,
allow_resize: false,
responsive_maintain_ratio: true,
max_WIDTH: '',
max_HEIGHT: ''
});
很遗憾,开发人员不再提供支持或回复联系方式。尽管如此,它是一个很棒的插件。有一些很好的文档,但如前所述,没有显示在结合使用 smoothzoom 和 prettyphoto 时如何使用地标:
我创建了一个显示地标功能的小提琴,http://jsfiddle.net/7zqLstpg/2/
我还创建了一个小提琴,我试图在我认为应该可以工作的 Smoothzoom/prettyphoto 弹出式灯箱中添加地标:
http://jsfiddle.net/14LjzLrk/10/
现在是否有人可以指导我完成最后的小提琴工作?
【问题讨论】:
标签: jquery jquery-plugins prettyphoto