From ccbb2e2e12ff662949205ef33b5af058fcd38648 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 10 Jun 2019 11:22:52 +0200 Subject: [PATCH] link map visual tweaks --- src/public/javascripts/dialogs/link_map.js | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/public/javascripts/dialogs/link_map.js b/src/public/javascripts/dialogs/link_map.js index de56b190c..fada7f76b 100644 --- a/src/public/javascripts/dialogs/link_map.js +++ b/src/public/javascripts/dialogs/link_map.js @@ -6,22 +6,13 @@ import linkService from "../services/link.js"; const $linkMapContainer = $("#link-map-container"); -const uniDirectionalOverlays = [ - [ "Arrow", { - location: 1, - id: "arrow", - length: 14, - foldback: 0.8 - } ], - [ "Label", { label: "", id: "label", cssClass: "connection-label" }] -]; - const linkOverlays = [ [ "Arrow", { location: 1, id: "arrow", - length: 14, - foldback: 0.8 + length: 10, + width: 10, + foldback: 0.7 } ] ]; @@ -165,6 +156,10 @@ function cleanup() { // without this we still end up with note boxes remaining in the canvas $linkMapContainer.empty(); + + // reset zoom/pan + pzInstance.zoomTo(0, 0, 1); + pzInstance.moveTo(0, 0); } function initJsPlumbInstance() { @@ -175,9 +170,9 @@ function initJsPlumbInstance() { } jsPlumbInstance = jsPlumb.getInstance({ - Endpoint: ["Dot", {radius: 2}], - ConnectionOverlays: uniDirectionalOverlays, - HoverPaintStyle: { stroke: "#777", strokeWidth: 1 }, + ConnectionOverlays: linkOverlays, + PaintStyle: { stroke: "var(--muted-text-color)", strokeWidth: 1 }, + HoverPaintStyle: { stroke: "var(--main-text-color)", strokeWidth: 1 }, Container: $linkMapContainer.attr("id") });