122 questions
1
vote
1
answer
65
views
How do I programmatically handle swipe-to-scroll behavior?
I noticed that the template I am currently working on has a vertical scrolling issue when tested on tablet and/or mobile devices.
Here is the current behavior:
Remarks: There are issues with the ...
1
vote
0
answers
71
views
How to enable simultaneous independent scrolling for multiple draggable elements using Interact.js?
I’m building a multi-touch application using HTML, CSS, jQuery, and Interact.js. The application has draggable squares that display content (HTML files loaded via iframes). Each square has its own ...
2
votes
1
answer
150
views
Creating/moving a dropzone while dragging with interact.js
I'm writing an application where I use interact.js for DND(drag and drop). Often the start of a DND interaction causes a change in the page; dropzones changing position, being deleted, and new ones ...
0
votes
1
answer
74
views
importmap raises "SyntaxError: Unexpected identifier" with interact.js
I'm trying to import interact.js with an importmap, but I get the error:
Uncaught SyntaxError: Unexpected identifier 'interactjs'.
My importmap:
<script type="importmap">
{
...
0
votes
1
answer
1k
views
Svelte 5 reactive $state in external module (dragListener)
I am trying to refactor a dragListener into a .svelte.js module by defining the position of the dragged element as a reactive $state() variable inside +page.svelte and pass it back and forth between ...
0
votes
1
answer
249
views
Interact.js draggable elements prematurely "dropped" in chrome and android emulator
I'm updating an old Ionic + Angular app, and am seeing a strange behaviour: elements made draggable with Interact.js will drag for a few hundred milliseconds, only to abort prematurely and fire the ...
0
votes
1
answer
237
views
Vue Draggable List is not parsed properly in VueJs3
I want to make a list of draggable objects like the one on the left side of this image:
To do so I have modified Vue2InteractDraggable.vue to work with VueJs3 as you can see in this codesandbox, but ...
0
votes
1
answer
559
views
Keyboard support in interact.js drag
I've setup interact.js draggable as -
interact('.draggable')
.draggable({
onstart: (event: Interact.InteractEvent) => onstartRef.current(event),
onmove: (...
0
votes
1
answer
202
views
How do I change the css of an element on a drop event in interact.js?
This is my code, I've tried using setAttribute and don't understand why it doesn't work. I've also tried using .transform with the same result.
setAttribute is located in the ondrop event function.
...
0
votes
1
answer
210
views
interact.js disable native scoll
I would like develop a VueJS swip cards app but interactJS disable the y-axis native scroll on mobile. I reproduce my app on this codepen : https://codepen.io/ostaladaFab/pen/LYQBvXm/...
0
votes
1
answer
30
views
Trouble using external javascript libraries in rails 6.0.0
<script>
import '@interactjs/auto-start'
import '@interactjs/actions/drag'
import '@interactjs/actions/resize'
import '@interactjs/modifiers'
import '@interactjs/dev-tools'
import interact from '...
2
votes
0
answers
750
views
Stop Overlapping while dragging divs
My requirement is to have multiple divs with resizable and draggable property. I can resize any of them and can place at any position. I am able to resize them and can drag them but they get ...
8
votes
2
answers
4k
views
how to restrict drag elements in interact.js
I'm trying to stop my elements from overlapping using interact.js, but I don't have any idea how to get the n elements to be able to do it. Does anyone have an idea? Or some other way I can validate ...
0
votes
1
answer
843
views
Vertically Scrollable Dropzone in Interact.js
Use Case:
What i am trying to do is to create a pdf editior, so there are fields such as textbox etc on the right side and a pdf on the left side. the user can drag and drop a field onto the pdf. (and ...
1
vote
1
answer
2k
views
InteractJs - Dynamic Snapping of draggable items to guideline in parent div
In the below fiddle I have interact Js to snap the children element to a certain point.
But I am having trouble snapping all sides of the blue div to snap to center and x & y axis of the parent ...