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
30bfff81
Commit
30bfff81
authored
Jun 25, 2015
by
samhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified enableDisableClip (now called enableDisableViewClip) and
moved it to where the other clipping functions are.
parent
4f19e5c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
ui.js
include/ui.js
+17
-16
No files found.
include/ui.js
View file @
30bfff81
...
@@ -220,7 +220,7 @@ var UI;
...
@@ -220,7 +220,7 @@ var UI;
$D
(
"noVNC_resize"
).
onchange
=
function
()
{
$D
(
"noVNC_resize"
).
onchange
=
function
()
{
var
connected
=
UI
.
rfb
&&
UI
.
rfb_state
===
'normal'
;
var
connected
=
UI
.
rfb
&&
UI
.
rfb_state
===
'normal'
;
UI
.
enableDisableClip
(
connected
);
UI
.
enableDisable
View
Clip
(
connected
);
};
};
},
},
...
@@ -685,7 +685,7 @@ var UI;
...
@@ -685,7 +685,7 @@ var UI;
$D
(
'noVNC_cursor'
).
disabled
=
true
;
$D
(
'noVNC_cursor'
).
disabled
=
true
;
}
}
UI
.
enableDisableClip
(
connected
);
UI
.
enableDisable
View
Clip
(
connected
);
$D
(
'noVNC_resize'
).
disabled
=
connected
;
$D
(
'noVNC_resize'
).
disabled
=
connected
;
$D
(
'noVNC_shared'
).
disabled
=
connected
;
$D
(
'noVNC_shared'
).
disabled
=
connected
;
$D
(
'noVNC_view_only'
).
disabled
=
connected
;
$D
(
'noVNC_view_only'
).
disabled
=
connected
;
...
@@ -747,19 +747,6 @@ var UI;
...
@@ -747,19 +747,6 @@ var UI;
}
}
},
},
enableDisableClip
:
function
(
connected
)
{
var
resizeElem
=
$D
(
'noVNC_resize'
);
if
(
resizeElem
.
value
===
'downscale'
||
resizeElem
.
value
===
'scale'
)
{
UI
.
forceSetting
(
'clip'
,
false
);
$D
(
'noVNC_clip'
).
disabled
=
true
;
}
else
{
$D
(
'noVNC_clip'
).
disabled
=
connected
||
UI
.
isTouchDevice
;
if
(
UI
.
isTouchDevice
)
{
UI
.
forceSetting
(
'clip'
,
true
);
}
}
},
// This resize can not be done until we know from the first Frame Buffer Update
// This resize can not be done until we know from the first Frame Buffer Update
// if it is supported or not.
// if it is supported or not.
// The resize is needed to make sure the server desktop size is updated to the
// The resize is needed to make sure the server desktop size is updated to the
...
@@ -849,7 +836,7 @@ var UI;
...
@@ -849,7 +836,7 @@ var UI;
Util
.
Debug
(
"<< UI.clipSend"
);
Util
.
Debug
(
"<< UI.clipSend"
);
},
},
//
Enable/disable
and configure viewport clipping
//
Set
and configure viewport clipping
setViewClip
:
function
(
clip
)
{
setViewClip
:
function
(
clip
)
{
var
display
;
var
display
;
if
(
UI
.
rfb
)
{
if
(
UI
.
rfb
)
{
...
@@ -900,6 +887,20 @@ var UI;
...
@@ -900,6 +887,20 @@ var UI;
}
}
},
},
// Handle special cases where clipping is forced on/off or locked
enableDisableViewClip
:
function
(
connected
)
{
var
resizeElem
=
$D
(
'noVNC_resize'
);
if
(
resizeElem
.
value
===
'downscale'
||
resizeElem
.
value
===
'scale'
)
{
UI
.
forceSetting
(
'clip'
,
false
);
$D
(
'noVNC_clip'
).
disabled
=
true
;
}
else
{
$D
(
'noVNC_clip'
).
disabled
=
connected
||
UI
.
isTouchDevice
;
if
(
UI
.
isTouchDevice
)
{
UI
.
forceSetting
(
'clip'
,
true
);
}
}
},
// Update the viewport drag/move button
// Update the viewport drag/move button
updateViewDrag
:
function
(
drag
)
{
updateViewDrag
:
function
(
drag
)
{
if
(
!
UI
.
rfb
)
return
;
if
(
!
UI
.
rfb
)
return
;
...
...
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