|
|
|
@ -3,11 +3,6 @@ export class AvaloniaDOM { |
|
|
|
// Root element
|
|
|
|
host.classList.add("avalonia-container"); |
|
|
|
host.tabIndex = 0; |
|
|
|
host.style.touchAction = "none"; |
|
|
|
// host.style.position = "relative";
|
|
|
|
host.style.position = "fixed"; |
|
|
|
host.style.width = "100vw"; |
|
|
|
host.style.height = "100vh"; |
|
|
|
host.oncontextmenu = function () { return false; }; |
|
|
|
|
|
|
|
// Rendering target canvas
|
|
|
|
@ -16,12 +11,13 @@ export class AvaloniaDOM { |
|
|
|
canvas.style.backgroundColor = "#ccc"; |
|
|
|
canvas.style.width = "100%"; |
|
|
|
canvas.style.height = "100%"; |
|
|
|
//canvas.style.position = "absolute";
|
|
|
|
host.appendChild(canvas); |
|
|
|
|
|
|
|
// Native controls host
|
|
|
|
const nativeHost = document.createElement("div"); |
|
|
|
nativeHost.classList.add('avalonia-native-host'); |
|
|
|
nativeHost.style.left = "0px"; |
|
|
|
nativeHost.style.top = "0px"; |
|
|
|
nativeHost.style.width = "100%"; |
|
|
|
nativeHost.style.height = "100%"; |
|
|
|
nativeHost.style.position = "absolute"; |
|
|
|
@ -33,6 +29,8 @@ export class AvaloniaDOM { |
|
|
|
inputElement.type = "text"; |
|
|
|
inputElement.classList.add('avalonia-input-element'); |
|
|
|
inputElement.style.opacity = "0"; |
|
|
|
inputElement.style.left = "0px"; |
|
|
|
inputElement.style.top = "0px"; |
|
|
|
inputElement.style.width = "100%"; |
|
|
|
inputElement.style.height = "100%"; |
|
|
|
inputElement.style.position = "absolute"; |
|
|
|
|