最佳答案
您可以在脚本标签之间添加:
var objects = [{x: 0, y: 800, r: 800, isInObject: isInCircle, title: 'whole image', getCenter: getRectCenter }]
注意:设置 y 和 r 以覆盖您的图像。
当您为 iviewer 设置默认值时:
onClick: function(coords) {
var object = whereIam(coords.x, coords.y);
if (object)
window.location="cart.html";
}
whereIam 是 iviewer 的默认函数。
关于javascript - 制作背景图片链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3105431/