react-draggable
react-draggable copied to clipboard
bound='parent' option in flex box
in this case :
<div style="display: flex;flex-direction: 'column'; width: 800px; height: 600px">
<div style='width: 300px' id='leftside'></div>
<div style='flex:1'>
<Draggble bounds='parent'><div>bound drag</div></Draggble>
</div>
</div>
bound option seems work fine to lock the draggable div in 800*600 area, but offset left was ignore. i mean draggable div was not suppposed to be able to dragged to x=0px , is was supposed to 300px
is there anyone help me? thanks very much
hey, guys. Does anyone solve this problem?
having the same issue, help would be appreciated
I have the same issue too
set position at parent node will resolve this problem
I have the same issue too
<div className={styles.draggable_border}>
<div ref={this.draggableArea} className={styles.draggable_area}>
<Draggable bounds='parent' grid={[25, 25]}>
<div className={styles.entrance}>
Вход
</div>
</Draggable>
</div>
</div>
.draggable_border
height: 900px
width: 600px
background-color: #fff
border: 2px solid #EFF0F6
border-radius: 16px
padding: 30px 30px 100px
margin: 30px auto 0
position: relative
&::after
background-color: #F6F7FA
border-radius: 50%
height: 40px
width: 40px
content: ''
position: absolute
left: 50%
bottom: 30px
transform: translateX(-50%)
.draggable_area
background-color: #F6F7FA
border-radius: 16px
border: 1px dashed #08B7D6
cursor: cell
cursor: url('../../../assets/images/icon_duplicate.svg'), auto
height: 100%
width: 100%
position: relative
.entrance
color: rgb(224, 229, 241)
font-size: 29px
font-weight: bold
text-align: center
Hello! I have this issue too. Maybe, I can fix this issue. I will try to fix this issue.