Revert "feat: add transform:scale() UI scaling for 1920x1080 canvas"

This reverts commit 6a6414510e.
This commit is contained in:
2026-06-12 16:30:58 +08:00
parent 6a6414510e
commit 18bf98aa16
5 changed files with 5 additions and 30 deletions

View File

@@ -4,14 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>剧情编辑器 — 交互式电影游戏</title> <title>剧情编辑器 — 交互式电影游戏</title>
<style> <link rel="stylesheet" href="./style.css" />
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>
</head> </head>
<body> <body>
<div id="editor-app"></div> <div id="editor-app"></div>

View File

@@ -2,13 +2,6 @@ import { createApp } from 'vue'
import { createPinia } from 'pinia' import { createPinia } from 'pinia'
import EditorApp from './App.vue' 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) const app = createApp(EditorApp)
app.use(createPinia()) app.use(createPinia())
app.mount('#editor-app') app.mount('#editor-app')

View File

@@ -4,14 +4,6 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>交互式电影游戏</title> <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> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@@ -405,6 +405,10 @@ html, body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
} }
#app {
width: 100%;
height: 100%;
}
</style> </style>
<style scoped> <style scoped>

View File

@@ -2,13 +2,6 @@ import { createApp } from 'vue'
import { createPinia } from 'pinia' import { createPinia } from 'pinia'
import App from './App.vue' 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) const app = createApp(App)
app.use(createPinia()) app.use(createPinia())
app.mount('#app') app.mount('#app')