Open hendrialqori opened 11 months ago
Here's an example:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hot spots</title>
<link rel="stylesheet" href="../src/css/pannellum.css"/>
<script type="text/javascript" src="../src/js/pannellum.js"></script>
<script type="text/javascript" src="../src/js/libpannellum.js"></script>
<style>
#panorama {
width: 600px;
height: 400px;
}
</style>
</head>
<body>
<div id="panorama"></div>
<script>
function dragHandler(event, args) {
console.log(event, args);
}
pannellum.viewer('panorama', {
"type": "equirectangular",
"panorama": "examplepano.jpg",
"hotSpots": [
{
"pitch": 14.1,
"yaw": 1.5,
"type": "info",
"text": "Example",
"draggable": true,
"dragHandlerFunc": dragHandler,
"dragHandlerArgs": "example arg"
},
]
});
</script>
</body>
</html>
Note that this was added after v2.5.6 was released, so you need to use the Git master
branch.
Hello @mpetroff
Is there an example of how to make hotspot draggable? I have read doc/json-config-parameters.md but it does not work for me.
Thank you in advance.