diff --git a/frontend/src/Editor/DraggableBox.jsx b/frontend/src/Editor/DraggableBox.jsx index 680cb7f874..647aab8d7c 100644 --- a/frontend/src/Editor/DraggableBox.jsx +++ b/frontend/src/Editor/DraggableBox.jsx @@ -45,18 +45,13 @@ function computeWidth(currentLayoutOptions) { return `${currentLayoutOptions?.width}%`; } -function getStyles(left, top, isDragging, component, isSelectedComponent, currentLayoutOptions) { - // const transform = `translate3d(${left}px, ${top}px, 0)`; +function getStyles(isDragging, isSelectedComponent) { return { position: 'absolute', - // transform, - // WebkitTransform: transform, zIndex: isSelectedComponent ? 2 : 1, // IE fallback: hide the real node using CSS when dragging // because IE will ignore our custom "empty image" drag preview. opacity: isDragging ? 0 : 1, - height: isDragging ? 0 : '100%', - width: computeWidth(currentLayoutOptions), }; } @@ -179,6 +174,7 @@ export const DraggableBox = function DraggableBox({ className="draggable-box " onMouseOver={() => setMouseOver(true)} onMouseLeave={() => setMouseOver(false)} + style={getStyles(isDragging, isSelectedComponent)} >