[FEAT] Modal size fixes

This commit is contained in:
2026-01-01 19:55:11 +01:00
parent e51cb4b334
commit 9cac4e6fd8
5 changed files with 9 additions and 9 deletions

View File

@@ -68,7 +68,7 @@
const position = ref({ x: 0, y: 0 });
const size = ref({
width: props.initialWidth || 800,
height: props.initialHeight || 600,
height: props.initialHeight || 400,
});
const isDragging = ref(false);
@@ -190,8 +190,8 @@
const constrainSize = (width: number, height: number) => {
return {
width: Math.max(400, Math.min(width, window.innerWidth - position.value.x)),
height: Math.max(300, Math.min(height, window.innerHeight - position.value.y)),
width: Math.max(300, Math.min(width, window.innerWidth - position.value.x)),
height: Math.max(200, Math.min(height, window.innerHeight - position.value.y)),
};
};