feat: The translation box can be set to adaptive height

This commit is contained in:
Gabe
2025-10-26 16:18:56 +08:00
parent 61a515c1d2
commit bdaf665b7c
5 changed files with 45 additions and 6 deletions

View File

@@ -150,6 +150,7 @@ export default function DraggableResizable({
setPosition,
onChangeSize,
onChangePosition,
autoHeight,
...props
}) {
const lineWidth = 4;
@@ -222,11 +223,19 @@ export default function DraggableResizable({
</Pointer>
<Box
className="KT-draggable-container"
style={{
width: size.w,
height: size.h,
overflow: "hidden auto",
}}
style={
autoHeight
? {
width: size.w,
maxHeight: size.h,
overflow: "hidden auto",
}
: {
width: size.w,
height: size.h,
overflow: "hidden auto",
}
}
>
{children}
</Box>