mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fix: roundback width to max parent with
This commit is contained in:
parent
9db3039264
commit
8bc0318e10
1 changed files with 2 additions and 2 deletions
|
|
@ -885,12 +885,12 @@ const SubWidgetWrapper = ({
|
|||
|
||||
const isDragging = useGridStore((state) => state?.draggingComponentId === id);
|
||||
|
||||
const width = (canvasWidth * layoutData.width) / 43;
|
||||
let width = (canvasWidth * layoutData.width) / 43;
|
||||
width = width > canvasWidth ? canvasWidth : width; //this handles scenarios where the width is set more than canvas for older components
|
||||
const styles = {
|
||||
width: width + 'px',
|
||||
height: layoutData.height + 'px',
|
||||
transform: `translate(${layoutData.left * gridWidth}px, ${layoutData.top}px)`,
|
||||
// ...(isGhostComponent ? { opacity: 0.5 } : isResizing ? { opacity: 0 } : {}),
|
||||
...(isGhostComponent ? { opacity: 0.5 } : {}),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue