mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-01-15 06:23:24 -08:00
44 lines
1.2 KiB
HTML
44 lines
1.2 KiB
HTML
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="description" content="on zoomChanged event listener">
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width">
|
|
<title>on zoomChanged event listener</title>
|
|
</head>
|
|
<body bgcolor="black">
|
|
<!-- include Aladin Lite CSS file in the head section of your page -->
|
|
<link rel="stylesheet" href="../distrib/latest/aladin.min.css" />
|
|
|
|
<!-- you can skip the following line if your page already integrates the jQuery library -->
|
|
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.min.js" charset="utf-8"></script>
|
|
|
|
|
|
<!-- insert this snippet where you want Aladin Lite viewer to appear and after the loading of jQuery -->
|
|
<div id="aladin-lite-div" style="width:15px;height:15px;"></div>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../distrib/latest/aladin.min.js" charset="utf-8"></script>
|
|
<script type="text/javascript">
|
|
|
|
var aladin = A.aladin('#aladin-lite-div', {target: 'M81', fov: 0.5, fullScreen: true});
|
|
|
|
|
|
aladin.on('zoomChanged', function(newFov){
|
|
console.log(aladin.getFov());
|
|
});
|
|
|
|
aladin.setFov(3.0);
|
|
console.log(aladin.getFov());
|
|
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|
|
|