This commit is contained in:
yyc12345 2020-05-02 15:10:08 +08:00
parent a5174e935a
commit f81d7e5b59
2 changed files with 8 additions and 5 deletions

View File

@ -3,7 +3,6 @@ currentSettings = {
"plink": true,
"properties": true,
"highlight": true,
"keyboard": true,
"move": true
};
$(document).ready(function () {
@ -70,7 +69,8 @@ function highlightLink(target) {
}
// double one-click, only cancel highlight and don't apply any hightlight
if (realTarget == previousHighlight) {
// or user disable hightlight
if ((realTarget == previousHighlight) || !currentSettings["highlight"]) {
previousHighlight = "";
} else {
//apply new highlight
@ -97,6 +97,10 @@ function highlightLink(target) {
}
function queryInfo(obj) {
// confirm user enable this function
if (!currentSettings["properties"])
return;
$.post(window.location,
{
operation: "info",

View File

@ -9,7 +9,7 @@
<script src="{{static_js}}"></script>
</head>
<body style="display: flex; flex-flow: row; height: 100%; width: 100%; margin: 0; padding: 0;">
<body style="display: flex; flex-flow: row; height: 100%; width: 100%; margin: 0; padding: 0;" onkeydown="keyboardNavigation(true);" onkeyup="keyboardNavigation(false);">
<div style="display: flex; flex-flow: column; height: 100%; width: 80%; margin: 0; padding: 0;">
<div id="hamburgerMenu" style="display: flex; background: #cfcfcf; flex-flow: row; width: 100%; height: 50px; overflow: scroll;">
@ -99,8 +99,7 @@
<p style="margin: 5px;">Action:<br />
<input type="checkbox" id="sidepanel-display-properties" value="1" onclick="settingChange(&quot;properties&quot;);">Interactive property inspector</input><br />
<input type="checkbox" id="sidepanel-display-highlight" value="1" onclick="settingChange(&quot;highlight&quot;);">Highlight focused object</input><br />
<input type="checkbox" id="sidepanel-display-keyboard" value="1" onclick="settingChange(&quot;keyboard&quot;);">Use keyboard to move viewer</input><br />
<input type="checkbox" id="sidepanel-display-move" value="1" onclick="settingChange(&quot;move&quot;);">Move objects</input>
<input type="checkbox" id="sidepanel-display-move" value="1" onclick="settingChange(&quot;move&quot;);" disabled="true">Move objects</input>
</p>
</div>