Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
c6ad2099
Commit
c6ad2099
authored
11 years ago
by
samhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved comments
parent
cf19ad37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
input.js
include/input.js
+5
-6
No files found.
include/input.js
View file @
c6ad2099
...
@@ -548,17 +548,16 @@ function onMouseButton(e, down) {
...
@@ -548,17 +548,16 @@ function onMouseButton(e, down) {
}
else
{
}
else
{
clearTimeout
(
doubleClickTimer
);
clearTimeout
(
doubleClickTimer
);
// When the distance between the two touches is
less than
// When the distance between the two touches is
small enough
//
20 physical pixels force the position of the latter touch
//
force the position of the latter touch to the position of
// t
o the position of t
he first.
// the first.
var
xs
=
lastTouchPos
.
x
-
pos
.
x
;
var
xs
=
lastTouchPos
.
x
-
pos
.
x
;
var
ys
=
lastTouchPos
.
y
-
pos
.
y
;
var
ys
=
lastTouchPos
.
y
-
pos
.
y
;
var
d
=
Math
.
sqrt
((
xs
*
xs
)
+
(
ys
*
ys
));
var
d
=
Math
.
sqrt
((
xs
*
xs
)
+
(
ys
*
ys
));
// The devicePixelRatio is the ratio between logical pixels and
// The goal is to trigger on a certain physical width, the
// physical pixels. A devicePixelRatio of 2 means that the
// devicePixelRatio brings us a bit closer but is not optimal.
// physical linear resolution is double the logical resolution.
if
(
d
<
20
*
window
.
devicePixelRatio
)
{
if
(
d
<
20
*
window
.
devicePixelRatio
)
{
pos
=
lastTouchPos
;
pos
=
lastTouchPos
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment