mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Merge remote-tracking branch 'origin/main' into develop
This commit is contained in:
commit
22319251f5
1 changed files with 2 additions and 6 deletions
|
|
@ -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)}
|
||||
>
|
||||
<Rnd
|
||||
style={{ ...style }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue