From 2136faf1ae15f8e20ad1d6bb5431246ce72dd69a Mon Sep 17 00:00:00 2001 From: quenousimporte <76260127+quenousimporte@users.noreply.github.com> Date: Sun, 5 Feb 2023 10:20:27 +0100 Subject: [PATCH] fixed: hide note when network visible fixed: network height changed: escape to hide network fixed: do not save if not needed --- index.html | 1 - main.js | 15 ++++++++++++++- style.css | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 92b5149..fcc98e6 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,6 @@ - diff --git a/main.js b/main.js index 22abb05..0b2a11a 100644 --- a/main.js +++ b/main.js @@ -648,6 +648,7 @@ function shownotelinks() if (settings.enablenetwork) { networkpage.hidden = false; + md.hidden = true; function id(note) { return localdata.indexOf(note); @@ -712,8 +713,9 @@ function shownotelinks() var graph = new vis.Network(network, data, options); graph.on("click", function(event) { - loadnote(nodes.find(n => n.id == event.nodes[0]).label); networkpage.hidden = true; + md.hidden = false; + loadnote(nodes.find(n => n.id == event.nodes[0]).label); }); } else @@ -1771,6 +1773,12 @@ function save() return; } + if (saved) + { + console.log("nothing to save"); + return; + } + var content = getnotecontent(); if ((content == "" && backup != "") || content == "null" || content == "undefined") { @@ -2031,6 +2039,11 @@ function mainkeydownhandler() { loadlast(); } + else if (networkpage.hidden == false) + { + networkpage.hidden = true; + md.hidden = false; + } else if (preview.hidden == false) { togglepreview(); diff --git a/style.css b/style.css index bd636ab..0e4a6c6 100644 --- a/style.css +++ b/style.css @@ -57,7 +57,7 @@ body::-webkit-scrollbar-thumb { position: absolute; top: 0; width: 100%; - height: 600px; + height: 100%; opacity: 1; }