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

View File

@ -9,7 +9,7 @@
<script src="{{static_js}}"></script> <script src="{{static_js}}"></script>
</head> </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 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;"> <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 /> <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-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-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;);" disabled="true">Move objects</input>
<input type="checkbox" id="sidepanel-display-move" value="1" onclick="settingChange(&quot;move&quot;);">Move objects</input>
</p> </p>
</div> </div>