molstar
Version:
A comprehensive macromolecular library.
37 lines (36 loc) • 1.28 kB
JavaScript
/**
* Copyright (c) 2025 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
import { getMVSStoriesContext } from './context';
import './elements';
import { MVSData } from '../../extensions/mvs/mvs-data';
import './favicon.ico';
import '../../mol-plugin-ui/skin/light.scss';
import './styles.scss';
import './index.html';
export function getContext(name) {
return getMVSStoriesContext({ name });
}
export function loadFromURL(url, options) {
setTimeout(() => {
var _a;
getContext(options === null || options === void 0 ? void 0 : options.contextName).dispatch({
kind: 'load-mvs',
format: (_a = options === null || options === void 0 ? void 0 : options.format) !== null && _a !== void 0 ? _a : 'mvsj',
url,
});
}, 0);
}
export function loadFromData(data, options) {
setTimeout(() => {
var _a;
getContext(options === null || options === void 0 ? void 0 : options.contextName).dispatch({
kind: 'load-mvs',
format: (_a = options === null || options === void 0 ? void 0 : options.format) !== null && _a !== void 0 ? _a : 'mvsj',
data,
});
}, 0);
}
export { MVSData };