mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
link map visual tweaks
This commit is contained in:
parent
2bf2ec5a6c
commit
ccbb2e2e12
@ -6,22 +6,13 @@ import linkService from "../services/link.js";
|
|||||||
|
|
||||||
const $linkMapContainer = $("#link-map-container");
|
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 = [
|
const linkOverlays = [
|
||||||
[ "Arrow", {
|
[ "Arrow", {
|
||||||
location: 1,
|
location: 1,
|
||||||
id: "arrow",
|
id: "arrow",
|
||||||
length: 14,
|
length: 10,
|
||||||
foldback: 0.8
|
width: 10,
|
||||||
|
foldback: 0.7
|
||||||
} ]
|
} ]
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -165,6 +156,10 @@ function cleanup() {
|
|||||||
|
|
||||||
// without this we still end up with note boxes remaining in the canvas
|
// without this we still end up with note boxes remaining in the canvas
|
||||||
$linkMapContainer.empty();
|
$linkMapContainer.empty();
|
||||||
|
|
||||||
|
// reset zoom/pan
|
||||||
|
pzInstance.zoomTo(0, 0, 1);
|
||||||
|
pzInstance.moveTo(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function initJsPlumbInstance() {
|
function initJsPlumbInstance() {
|
||||||
@ -175,9 +170,9 @@ function initJsPlumbInstance() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jsPlumbInstance = jsPlumb.getInstance({
|
jsPlumbInstance = jsPlumb.getInstance({
|
||||||
Endpoint: ["Dot", {radius: 2}],
|
ConnectionOverlays: linkOverlays,
|
||||||
ConnectionOverlays: uniDirectionalOverlays,
|
PaintStyle: { stroke: "var(--muted-text-color)", strokeWidth: 1 },
|
||||||
HoverPaintStyle: { stroke: "#777", strokeWidth: 1 },
|
HoverPaintStyle: { stroke: "var(--main-text-color)", strokeWidth: 1 },
|
||||||
Container: $linkMapContainer.attr("id")
|
Container: $linkMapContainer.attr("id")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user