Revert "feat: add transform:scale() UI scaling for 1920x1080 canvas"
This reverts commit 6a6414510e.
This commit is contained in:
@@ -4,14 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>剧情编辑器 — 交互式电影游戏</title>
|
||||
<style>
|
||||
html, body { width: 100vw; height: 100vh; margin: 0; overflow: hidden; background: #0a0a16; }
|
||||
#editor-app {
|
||||
width: 1920px; height: 1080px;
|
||||
transform-origin: top left;
|
||||
transform: scale(var(--scale));
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="./style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="editor-app"></div>
|
||||
|
||||
@@ -2,13 +2,6 @@ import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import EditorApp from './App.vue'
|
||||
|
||||
function applyScale() {
|
||||
const s = Math.min(window.innerWidth / 1920, window.innerHeight / 1080)
|
||||
document.documentElement.style.setProperty('--scale', String(s))
|
||||
}
|
||||
applyScale()
|
||||
window.addEventListener('resize', applyScale)
|
||||
|
||||
const app = createApp(EditorApp)
|
||||
app.use(createPinia())
|
||||
app.mount('#editor-app')
|
||||
|
||||
@@ -4,14 +4,6 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>交互式电影游戏</title>
|
||||
<style>
|
||||
html, body { width: 100vw; height: 100vh; margin: 0; overflow: hidden; background: #000; }
|
||||
#app {
|
||||
width: 1920px; height: 1080px;
|
||||
transform-origin: top left;
|
||||
transform: scale(var(--scale));
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -405,6 +405,10 @@ html, body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
}
|
||||
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -2,13 +2,6 @@ import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import App from './App.vue'
|
||||
|
||||
function applyScale() {
|
||||
const s = Math.min(window.innerWidth / 1920, window.innerHeight / 1080)
|
||||
document.documentElement.style.setProperty('--scale', String(s))
|
||||
}
|
||||
applyScale()
|
||||
window.addEventListener('resize', applyScale)
|
||||
|
||||
const app = createApp(App)
|
||||
app.use(createPinia())
|
||||
app.mount('#app')
|
||||
|
||||
Reference in New Issue
Block a user