These are chat archives for taye/interact.js

3rd
Oct 2017
taye
@taye
Oct 03 2017 06:26
@/all I'm pushing to get v1.3.0 released before the end of the month. One of the most time-consuming tasks is getting the docs up to date. There's a growing checklist for documentation at #547. The new doc pages will look something like this: https://user-images.githubusercontent.com/1679746/31111440-669ce590-a80e-11e7-93aa-edf562f00c1a.png
I've opened a Patreon page for people who would like to contribute financially: https://www.patreon.com/taye_
Tushar A Deshmukh
@tusharadeshmukh_twitter
Oct 03 2017 07:11
Hello I am new to interact.js
I have one query it will great if any one help me

draggableElement.textContent = 'Dragged in';
event.relatedTarget.textContent = 'Dropped';

so what I get I can add only text as a dragged and Dropped element can we use this for some piece of Html code means I want to drag and drop some html elements together

taye
@taye
Oct 03 2017 07:22
@tusharadeshmukh_twitter the event objects give you the element that is being dragged and the element that it gets dropped into (event.target). You can use the DOM APIs on those objects to manipulate the HTML elements on the page.
Tushar A Deshmukh
@tusharadeshmukh_twitter
Oct 03 2017 08:15

Please check this example<div style="height:100px; border:2px; ">
<div id="yes-drop" class="draggable drag-drop"> <p>#yes-drop</p> </div>
</div>

<div id="outer-dropzone" class="dropzone">
#outer-dropzone
<div id="inner-dropzone" class="dropzone">#inner-dropzone</div>
</div>

I need to drag div from inside a div to another div...
that is I need to drag yes-drop and drop inside inner-dropzone... but div yesdrop does not move out of the div it is contained in... How can I achieve this?
simadesign
@simadesign
Oct 03 2017 10:29
It's been a while that I tried this plugin. In the new version, is there an option to rotate and drag an object with the mouse?
taye
@taye
Oct 03 2017 11:28
@tusharadeshmukh_twitter did you also copy the function dragMoveListener (event) {... from the dragging demo?
If you're new to to JavaScript, it might be better to use an easier library like Dragula instead
taye
@taye
Oct 03 2017 15:03
@simadesign no there still isn't, but here's how you can get it working: https://codepen.io/taye/pen/wrrxKb