@rcsb/rcsb-saguaro-3d
Version:
RCSB Molstar/Saguaro Web App
37 lines • 1.24 kB
JavaScript
import { RcsbFv3DAssembly } from "../../RcsbFv3D/RcsbFv3DAssembly";
document.addEventListener("DOMContentLoaded", function (event) {
function getJsonFromUrl() {
const url = location.search;
var query = url.substring(1);
var result = {};
query.split("&").forEach(function (part) {
var item = part.split("=");
result[item[0]] = decodeURIComponent(item[1]);
});
return result;
}
const args = getJsonFromUrl().pdbId ? getJsonFromUrl() : { pdbId: "4hhb" };
const sequenceConfig = {
entryId: args.pdbId,
title: "Title " + args.pdbId,
subtitle: "Subtitle for " + args.pdbId
};
const panel3d = new RcsbFv3DAssembly({
elementId: "pfv",
config: sequenceConfig,
instanceSequenceConfig: {
dropdownTitle: "Chain",
module: "interface"
},
additionalConfig: {
boardConfig: {
elementClickCallback: (e) => {
console.log(`Element clicked ${e === null || e === void 0 ? void 0 : e.type}`);
}
}
},
useOperatorsFlag: true
});
panel3d.render();
});
//# sourceMappingURL=index.js.map