taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)

Home Page:http://interactjs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question Not Issue] how to make a div not draggable based on an input inside it

ISLEMNEDDAR opened this issue · comments

hello
nice project I used to create a sticky note section in my app
but I had a problem the note is draggable and I have a text area inside this note
so I want to make the div (note) not draggable when the text area is shown

any idea ?

well I was tired yesterday but the solution that I did is :

put the interact(target) in a variable

if(editable){ interactTarget = interact.draggable(false) }else{ interractTarget= interact.draggable({}) }