fixed: hide note when network visible
fixed: network height changed: escape to hide network fixed: do not save if not needed
This commit is contained in:
parent
276e4a0eff
commit
2136faf1ae
|
@ -17,7 +17,6 @@
|
|||
<script src="main.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
|
||||
|
||||
<div id="networkpage" hidden>
|
||||
<div id="network"></div>
|
||||
</div>
|
||||
|
|
15
main.js
15
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();
|
||||
|
|
Loading…
Reference in New Issue