This commit is contained in:
Yuan 2023-09-05 15:01:47 +08:00
parent 3221a7a694
commit 88230487d5
2 changed files with 5 additions and 4 deletions

View File

@ -240,6 +240,7 @@
</q-card-actions>
</q-card>
</q-dialog>
<q-resize-observer @resize="onResize" />
</q-layout>
</template>
@ -430,8 +431,8 @@ function onRightResize(size: { height: number; width: number }) {
}
function onResize() {
const clientWidth = document.body.clientWidth;
const clientHeight = document.body.clientHeight;
const clientWidth = document.documentElement.clientWidth;
const clientHeight = document.documentElement.clientHeight;
canvasWidth.value =
clientWidth -
(leftDrawerOpen.value ? leftWidth.value : 0) -

View File

@ -53,8 +53,8 @@ const drawerRight = ref(false);
const mapName = computed(() => lineStore.lineName);
function onResize() {
const clientWidth = document.body.clientWidth;
const clientHeight = document.body.clientHeight;
const clientWidth = document.documentElement.clientWidth;
const clientHeight = document.documentElement.clientHeight;
canvasWidth.value = clientWidth;
canvasHeight.value = clientHeight - headerHeight.value;
const dom = document.getElementById('line-app-container');