diff --git a/src/public/javascripts/dialogs/link_map.js b/src/public/javascripts/dialogs/link_map.js index 2b13f95e8..d9cb6fc65 100644 --- a/src/public/javascripts/dialogs/link_map.js +++ b/src/public/javascripts/dialogs/link_map.js @@ -32,8 +32,8 @@ async function showDialog() { glob.activeDialog = $dialog; // set default settings - $maxNotesInput.val(50); - LINK_TYPES.forEach(lt => $("#link-map-" + lt).attr("checked", "checked")); + $maxNotesInput.val(20); + LINK_TYPES.forEach(lt => $("#link-map-" + lt).prop('checked', true)); await libraryLoader.requireLibrary(libraryLoader.LINK_MAP); @@ -54,8 +54,6 @@ async function loadNotesAndRelations() { const linkTypes = LINK_TYPES.filter(lt => $(`#link-map-${lt}:checked`).length > 0); const maxNotes = parseInt($maxNotesInput.val()); - console.log(linkTypes); - const activeNoteId = noteDetailService.getActiveNoteId(); const links = await server.post(`notes/${activeNoteId}/link-map`, { @@ -142,10 +140,12 @@ async function loadNotesAndRelations() { }, (node, p) => { const $noteBox = getNoteBox(node.id); + const middleW = $linkMapContainer.width() / 2; + const middleH = $linkMapContainer.height() / 2; $noteBox - .css("left", (300 + p.x * 100) + "px") - .css("top", (300 + p.y * 100) + "px"); + .css("left", (middleW + p.x * 100) + "px") + .css("top", (middleH + p.y * 100) + "px"); }, () => {}, () => {}, @@ -199,6 +199,7 @@ function initJsPlumbInstance() { } jsPlumbInstance = jsPlumb.getInstance({ + Endpoint: ["Blank", {}], ConnectionOverlays: linkOverlays, PaintStyle: { stroke: "var(--muted-text-color)", strokeWidth: 1 }, HoverPaintStyle: { stroke: "var(--main-text-color)", strokeWidth: 1 }, diff --git a/src/public/stylesheets/link_map.css b/src/public/stylesheets/link_map.css index 684166845..fdc8dfb16 100644 --- a/src/public/stylesheets/link_map.css +++ b/src/public/stylesheets/link_map.css @@ -39,4 +39,5 @@ .link-map-active-note { background-color: var(--more-accented-background-color) !important; + border-width: 3px !important; } \ No newline at end of file