feat: add transform:scale() UI scaling for 1920x1080 canvas
This commit is contained in:
@@ -2,6 +2,13 @@ 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')
|
||||
|
||||
Reference in New Issue
Block a user