Fix fractional units messing up calculations
Changed background-size to cover Revert dev changes
This commit is contained in:
parent
d5a66af227
commit
d3c51fbae4
|
@ -897,7 +897,8 @@ select:active {
|
|||
#noVNC_container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('../images/splash.jpg')
|
||||
background-image: url('../images/splash.jpg');
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
#noVNC_keyboardinput {
|
||||
|
|
21
app/ui.js
21
app/ui.js
|
@ -31,8 +31,8 @@ window.updateSetting = (name, value) => {
|
|||
}
|
||||
}
|
||||
|
||||
//import "core-js/stable";
|
||||
//import "regenerator-runtime/runtime";
|
||||
import "core-js/stable";
|
||||
import "regenerator-runtime/runtime";
|
||||
import * as Log from '../core/util/logging.js';
|
||||
import _, { l10n } from './localization.js';
|
||||
import { isTouchDevice, isSafari, hasScrollbarGutter, dragThreshold, supportsBinaryClipboard, isFirefox, isWindows, isIOS, supportsPointerLock }
|
||||
|
@ -1880,10 +1880,10 @@ const UI = {
|
|||
}
|
||||
monitors.push({
|
||||
id: screen.screenID,
|
||||
x: screen.x / scale,
|
||||
y: screen.y / scale,
|
||||
w: screen.serverWidth / scale,
|
||||
h: screen.serverHeight / scale,
|
||||
x: Math.round(screen.x / scale),
|
||||
y: Math.round(screen.y / scale),
|
||||
w: Math.round(screen.serverWidth / scale),
|
||||
h: Math.round(screen.serverHeight / scale),
|
||||
pixelRatio: screen.pixelRatio,
|
||||
scale: 1,
|
||||
fill: '#eeeeeecc',
|
||||
|
@ -1900,7 +1900,10 @@ const UI = {
|
|||
UI.monitors = monitors
|
||||
let deepCopyMonitors = JSON.parse(JSON.stringify(monitors))
|
||||
UI.sortedMonitors = deepCopyMonitors.sort((a, b) => {
|
||||
return a.x - b.x || a.y - b.y
|
||||
if (a.y >= b.y + (b.h / 2)) {
|
||||
return 1
|
||||
}
|
||||
return a.x - b.x
|
||||
})
|
||||
|
||||
},
|
||||
|
@ -1948,7 +1951,7 @@ const UI = {
|
|||
a.x = prevStart
|
||||
}
|
||||
if (a.x < prevStart) {
|
||||
if (a.y <= prevStartTop) {
|
||||
if (a.y < prevStartTop) {
|
||||
a.x = prevStart
|
||||
}
|
||||
}
|
||||
|
@ -2109,8 +2112,6 @@ const UI = {
|
|||
}
|
||||
return a.x - b.x
|
||||
})
|
||||
// console.log(UI.monitors)
|
||||
console.log(UI.sortedMonitors)
|
||||
UI.recenter()
|
||||
UI.draw()
|
||||
}
|
||||
|
|
4
vnc.html
4
vnc.html
|
@ -50,7 +50,7 @@
|
|||
<script src="vendor/interact.min.js"></script>
|
||||
|
||||
<!-- Stylesheets -->
|
||||
<link rel="stylesheet" href="app/styles/base.css">
|
||||
<!--link rel="stylesheet" href="app/styles/base.css">
|
||||
|
||||
<script src="app/error-handler.js"></script>
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<script type="module" crossorigin="use-credentials" src="app/ui.js"></script>
|
||||
<script type="module" crossorigin="use-credentials" src="app/ui.js"></script-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
Loading…
Reference in New Issue