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
2fb665ec
Commit
2fb665ec
authored
13 years ago
by
Joel Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git@github.com:kanaka/noVNC
parents
f31eeaa8
1a2371fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
canvas.js
include/canvas.js
+10
-1
input.js
include/input.js
+1
-0
No files found.
include/canvas.js
View file @
2fb665ec
...
...
@@ -38,7 +38,7 @@ cdef('target', 'dom', null, 'Canvas element for VNC viewport');
cdef
(
'focusContainer'
,
'dom'
,
document
,
'DOM element that traps keyboard input'
);
cdef
(
'true_color'
,
'bool'
,
true
,
'Request true color pixel data'
);
cdef
(
'colourMap'
,
'raw'
,
[],
'Colour map array (not true color)'
);
cdef
(
'scale'
,
'float'
,
1
,
'VNC viewport scale factor
'
);
cdef
(
'scale'
,
'float'
,
1
.0
,
'Viewport scale factor 0.1 - 1.0
'
);
cdef
(
'render_mode'
,
'str'
,
''
,
'Canvas rendering mode (read-only)'
);
...
...
@@ -70,6 +70,9 @@ that.set_colourMap = function(val, idx) {
that
.
set_render_mode
=
function
()
{
throw
(
"render_mode is read-only"
);
};
that
.
set_scale
=
function
(
scale
)
{
that
.
rescale
(
scale
);
};
// Add some other getters/setters
that
.
get_width
=
function
()
{
return
c_width
;
...
...
@@ -232,6 +235,12 @@ that.rescale = function(factor) {
return
;
}
if
(
factor
>
1.0
)
{
factor
=
1.0
;
}
else
if
(
factor
<
0.1
)
{
factor
=
0.1
;
}
if
(
conf
.
scale
===
factor
)
{
//Util.Debug("Canvas already scaled to '" + factor + "'");
return
;
...
...
This diff is collapsed.
Click to expand it.
include/input.js
View file @
2fb665ec
...
...
@@ -460,6 +460,7 @@ function cdef(v, type, defval, desc) {
// Capability settings, default can be overridden
cdef
(
'target'
,
'dom'
,
document
,
'DOM element that grabs mouse input'
);
cdef
(
'focused'
,
'bool'
,
true
,
'Capture and send mouse clicks/movement'
);
cdef
(
'scale'
,
'float'
,
1.0
,
'Viewport scale factor 0.0 - 1.0'
);
cdef
(
'mouseButton'
,
'func'
,
null
,
'Handler for mouse button click/release'
);
cdef
(
'mouseMove'
,
'func'
,
null
,
'Handler for mouse movement'
);
...
...
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