Minor changes

This commit is contained in:
navaneeth 2021-09-23 13:43:41 +05:30
parent eccd8a7cf2
commit 1da6049ee6
3 changed files with 8 additions and 5 deletions

View file

@ -20,7 +20,10 @@ export const BoxDragPreview = memo(function BoxDragPreview({ item, currentLayout
}
return (
<div style={{ height, width, border: 'solid 1px rgb(70, 165, 253)' }}>
<div
className="resizer-active draggable-box"
style={{ height, width, border: 'solid 1px rgb(70, 165, 253)', padding: '2px' }}
>
<div
style={{
background: '#438fd7',

View file

@ -208,7 +208,7 @@ export const Container = ({
width = width + deltaWidth;
height = height + deltaHeight;
[width, height] = doSnapToGrid(width, height)
// [width, height] = doSnapToGrid(width, height)
let newBoxes = {
...boxes,

View file

@ -181,7 +181,7 @@ export const DraggableBox = function DraggableBox({
>
<Rnd
style={{ ...style }}
resizeGrid={[30,10]}
resizeGrid={[30, 10]}
size={{
width: scaleWidth(currentLayoutOptions.width, scaleValue) + 6,
height: currentLayoutOptions.height + 6,
@ -192,10 +192,10 @@ export const DraggableBox = function DraggableBox({
}}
defaultSize={{}}
className={`resizer ${isSelectedComponent && !mouseOver ? 'resizer-selected' : ''} ${
mouseOver || isResizing ? 'resizer-active' : ''
isSelectedComponent ? 'resizer-active' : ''
} `}
onResize={() => setResizing(true)}
resizeHandleClasses={mouseOver ? resizerClasses : {}}
resizeHandleClasses={isSelectedComponent ? resizerClasses : {}}
resizeHandleStyles={resizerStyles}
disableDragging={true}
enableResizing={mode === 'edit'}