Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EXP Navigation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
almer
EXP Navigation
Commits
041c67c2
Commit
041c67c2
authored
2 years ago
by
jahugg
Browse files
Options
Downloads
Patches
Plain Diff
fixed button up, down issue
parent
e608ce71
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main.js
+15
-8
15 additions, 8 deletions
src/main.js
src/media/White-Noise.mp3
+0
-0
0 additions, 0 deletions
src/media/White-Noise.mp3
with
15 additions
and
8 deletions
src/main.js
+
15
−
8
View file @
041c67c2
...
...
@@ -5,8 +5,8 @@ const config = {
controls
:
{
mouse
:
true
,
button
:
true
,
voice
:
tru
e
,
motion
:
tru
e
,
voice
:
fals
e
,
motion
:
fals
e
,
},
};
...
...
@@ -105,7 +105,7 @@ const navigation = {
let
logId
=
0
;
// Create WebSocket connection.
const
socket
=
new
WebSocket
(
`wss://192.168.
27
.52:443`
);
const
socket
=
new
WebSocket
(
`wss://192.168.
151
.52:443`
);
// init application
function
init
()
{
...
...
@@ -325,8 +325,11 @@ function focusNextNavigationItem() {
if
(
!
currentItem
)
focusNavigationItem
(
1
);
else
if
(
currentItem
.
nextSibling
)
{
let
nextItem
=
currentItem
.
nextSibling
;
delete
currentItem
.
dataset
.
selected
;
currentItem
.
nextSibling
.
dataset
.
selected
=
""
;
nextItem
.
dataset
.
selected
=
""
;
let
index
=
Array
.
from
(
currentItem
.
parentNode
.
children
).
indexOf
(
nextItem
);
focusNavigationItem
(
index
+
1
);
}
else
focusNavigationItem
(
1
);
}
...
...
@@ -339,8 +342,11 @@ function focusPreviousNavigationItem() {
if
(
!
currentItem
)
focusNavigationItem
(
1
);
else
if
(
currentItem
.
previousSibling
)
{
let
prevItem
=
currentItem
.
previousSibling
;
delete
currentItem
.
dataset
.
selected
;
currentItem
.
previousSibling
.
dataset
.
selected
=
""
;
prevItem
.
dataset
.
selected
=
""
;
let
index
=
Array
.
from
(
currentItem
.
parentNode
.
children
).
indexOf
(
prevItem
);
focusNavigationItem
(
index
+
1
);
}
else
{
let
childCount
=
document
.
querySelector
(
"
#navigation > ul
"
).
children
.
length
;
focusNavigationItem
(
childCount
);
...
...
@@ -486,7 +492,8 @@ function addButtonControls() {
if
(
event
.
code
===
"
Tab
"
||
event
.
code
===
"
ArrowDown
"
)
focusNextNavigationItem
();
else
if
(
event
.
code
===
"
ArrowUp
"
)
focusPreviousNavigationItem
();
else
if
(
event
.
code
===
"
Enter
"
||
event
.
code
===
"
ShiftRight
"
)
navigateToSelected
();
else
if
(
event
.
code
===
"
Enter
"
||
event
.
code
===
"
ShiftRight
"
)
navigateToSelected
();
else
if
(
event
.
code
===
"
ArrowRight
"
)
moveDownNavigationLevel
();
else
if
(
event
.
code
===
"
ArrowLeft
"
||
event
.
code
===
"
Escape
"
)
moveUpNavigationLevel
();
...
...
@@ -612,8 +619,8 @@ function addMotionControls() {
let
screenCenter
=
new
Point
(
window
.
innerWidth
/
2
,
window
.
innerHeight
/
2
);
let
idleTimeout
;
let
idleDelay
=
4000
;
//idle time before reseting reference point
let
autoSelect
=
tru
e
;
// selecting items with time delay
let
drawMotionFlag
=
tru
e
;
// draw motion values for debugging
let
autoSelect
=
fals
e
;
// selecting items with time delay
let
drawMotionFlag
=
fals
e
;
// draw motion values for debugging
// motion buffer stuff
let
motionBuffer
=
[];
// motion value buffer
...
...
This diff is collapsed.
Click to expand it.
src/media/White-Noise.mp3
deleted
100644 → 0
+
0
−
0
View file @
e608ce71
File deleted
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment