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