Fix: Resize doesn't react as intended for top/bottom handles. (#4321)

This commit is contained in:
Ashok Kumar M 2021-05-11 20:09:33 +05:30 committed by GitHub
parent d6de913949
commit 3eeaf86097
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,7 @@ function DraggableComponent(props: DraggableComponentProps) {
// Display this draggable based on the current drag state
const style: CSSProperties = {
display: isCurrentWidgetDragging ? "none" : "flex",
display: isCurrentWidgetDragging ? "none" : "block",
};
// WidgetBoundaries
@ -172,6 +172,10 @@ function DraggableComponent(props: DraggableComponentProps) {
style={{
opacity:
isResizingOrDragging && selectedWidget !== props.widgetId ? 1 : 0,
position: "absolute",
transform: `translate(-50%, -50%)`,
top: "50%",
left: "50%",
}}
/>
);