Fix fractional units messing up calculations

Changed background-size to cover
Revert dev changes
This commit is contained in:
Chris Hunt 2023-10-18 11:57:31 +01:00
parent d5a66af227
commit d3c51fbae4
No known key found for this signature in database
3 changed files with 15 additions and 13 deletions

View File

@ -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 {

View File

@ -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()
}

View File

@ -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>