fixed navigator setvisible️

Signed-off-by: Rahul Chaudhari_ <rahulgc545@gmail.com>
This commit is contained in:
Rahul Chaudhari_ 2024-12-22 14:06:12 +05:30
parent 2776e3f854
commit c6ebf34925

View file

@ -1,42 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenSeadragon Navigator Test</title>
<script src="build/openseadragon/openseadragon.js"></script>
<style>
#viewer {
width: 800px;
height: 600px;
border: 1px solid black;
}
</style>
</head>
<body>
<div id="viewer"></div>
<button onclick="showNavigator()">Show Navigator</button>
<button onclick="hideNavigator()">Hide Navigator</button>
<script>
// Initialize the viewer
const viewer = OpenSeadragon({
id: "viewer",
tileSources:
"https://openseadragon.github.io/example-images/highsmith/highsmith.dzi",
showNavigator: true, // Enable the navigator
});
// Functions to test setVisible
function showNavigator() {
viewer.navigator.setVisible(true);
console.log("Navigator set to visible");
}
function hideNavigator() {
viewer.navigator.setVisible(false);
console.log("Navigator set to hidden");
}
</script>
</body>
</html>