Skip to content

Instantly share code, notes, and snippets.

@jcayouette
Created December 14, 2021 18:49
Show Gist options
  • Save jcayouette/032cbcefb242eef19d6caf660cd836ec to your computer and use it in GitHub Desktop.
Save jcayouette/032cbcefb242eef19d6caf660cd836ec to your computer and use it in GitHub Desktop.
import React, { useEffect } from "react";
const Aladin = () => {
useEffect(() => {
// To call external javascript function from index.html you need to specify window.function name.
let aladin = window.A.aladin("#aladin-lite-div", {
survey: "P/DSS2/color",
fov: 60,
});
aladin.setFov(1);
}, []);
return (
<div id="aladin-lite-div" style={{ width: "1024px", height: "768px" }} />
);
};
export default Aladin;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment