react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

bound='parent' option in flex box

Open javaxiu opened this issue 8 years ago • 6 comments

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

javaxiu avatar Dec 28 '16 03:12 javaxiu

hey, guys. Does anyone solve this problem?

Ggayane avatar Jun 20 '17 16:06 Ggayane

having the same issue, help would be appreciated

aphsai avatar Jul 10 '17 17:07 aphsai

I have the same issue too

mikelgarciaurbina avatar Dec 01 '17 02:12 mikelgarciaurbina

set position at parent node will resolve this problem

zhaozeq avatar Apr 08 '19 03:04 zhaozeq

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

ilya-maker avatar Feb 03 '21 09:02 ilya-maker

Hello! I have this issue too. Maybe, I can fix this issue. I will try to fix this issue.

WTomoharu avatar Aug 20 '21 13:08 WTomoharu