Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions core/frontend/records.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ window.addEventListener('DOMContentLoaded', () => {
unlightNodes();
}
});
// if start_page set, and hash not set, set it on page load, make sure its done after the event listener is registered
if (graphProperties.start_page != "" && window.location.hash == "") {
window.location.hash = graphProperties.start_page;
const recordId = getRecordIdFromHash();
if (recordId) {
openRecord(recordId);
// comment this out to prevent the jarring translation when clicking on nodes
// zoomToNode(recordId);
}
}

function openRecord(id) {
const recordContent = document.getElementById(id);
Expand Down
1 change: 1 addition & 0 deletions core/models/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module.exports = class Config {
css_custom: '',
devtools: false,
lang: 'en',
start_page: '',
});

/**
Expand Down