[FEAT] Modal size fixes
This commit is contained in:
@@ -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)),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user