export const CONFIG = {
apiEndpoint: '',
graphPath: '/api/graph',
configPath: '/api/config'
};
export const state = {
cy: null,
graphData: null,
currentLayout: 'cose',
selectedNode: null,
isSimpleView: false,
centerMode: false, currentLang: 'en', itemCy: null,
currentModuleForItemGraph: null,
showItems: false };
export function setCy(instance) {
state.cy = instance;
}
export function setGraphData(data) {
state.graphData = data;
}
export function setSelectedNode(node) {
state.selectedNode = node;
}
export function setCurrentLayout(layout) {
state.currentLayout = layout;
}
export function setSimpleView(isSimple) {
state.isSimpleView = isSimple;
}
export function setCenterMode(mode) {
state.centerMode = mode;
}
export function setCurrentLang(lang) {
state.currentLang = lang;
}
export function setItemCy(instance) {
state.itemCy = instance;
}
export function setCurrentModuleForItemGraph(moduleId) {
state.currentModuleForItemGraph = moduleId;
}
export function setShowItems(show) {
state.showItems = show;
}