我正在尝试使用 clickHandlerFunc 打开一个模态框。我收到错误“Uncaught TypeError: a.clickHandlerFunc is not a function at HTMLDivElement. (pannellum.js:68)”
以下是我的代码:
"hotSpots": [
{
"pitch": 1.60311491347256,
"yaw": 22.349004691308146,
"type": "scene",
"text": '',
"sceneId": "",
"clickHandlerFunc": "openModal"
},
function openModal() {
$(".popup-overlay, .popup-content").addClass("active");
}
我该如何解决这个问题?单击热点时,我需要打开一个模式框。