121 questions
1
vote
0
answers
70
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
139
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
240
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
236
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
547
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
748
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
841
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 ...
1
vote
0
answers
190
views
How to access different resources of floorplan and save position of each resource in database
I am having an image of a floorplan like this
There are two things which I am looking
I am having the record in my database which tells the occupancy of each cabin or seat, whether it's occupied or ...
1
vote
0
answers
108
views
Why is a vue js div changing position on an interact.js grid?
I'm using interact js and calculations to try to save a representation of a room on a blueprint and return it to the same relative place on the grid when the blueprint is reloaded. On floor reload, ...
1
vote
1
answer
389
views
multiple vertical scrollable divs on multitouch problem
i try to scroll 2 text fields vertically on a multitouch application, each one works for itself, but as soon as i try to scroll both, only the one touched first works.
is there a workaround here?
...
1
vote
2
answers
1k
views
How to move elements from one div to another without resetting to original position? (interact.js)
I am using interact.js and am trying to separate the elements into two divs (toolbox and matrix to be solved).
However when I attempt to implement this, if the elements and the matrix are not in the ...
1
vote
1
answer
656
views
interactjs drag stops after few events
I just had a heavy problems with a vue cli project with interactjs
the latest version is installed
"interactjs": "^ 1.10.3",
I use in vue https://github.com/kimuraz/vue-interact
...
0
votes
1
answer
606
views
Interact.js - dragging single div "jumping around" in Ember
I'm using Ember, and I'm trying to setup a simple draggable div example using the interact.js library but I'm having some issues.
I'm aware that the library DOES NOT modify the DOM and you need to do ...
0
votes
1
answer
413
views
Is there any handler to rotate an object? [closed]
This seems to be possible in the mobile version of interact.js while I am looking for a solution that works also in standard desktop browser.
2
votes
2
answers
928
views
interact.js - how to fire dragstart programmatically
I'm trying to start the drag of a draggable item after 1000ms of the touchstart event.
I was able to fire the "dragstart" event:
interact(element).fire({type: 'dragstart'});
but it just executes the ...
1
vote
1
answer
281
views
interact.js - trello-style scrollable list of draggable items in a droparea
Good morning, I created a simple trello-style interface.
Obviously I want to scroll the cards in a column: that works on a desktop pc with mouse wheel, but not on a smartphone using the touch scroll ...
2
votes
1
answer
452
views
Dynamic modification of snapping values
I start with interract.js and try to figure out how to snap my elements to defined sizes in the index targets. It works well when I set the values statically but actually I would like to dynamize the ...
0
votes
1
answer
1k
views
Resizing with snap in interact.js
In this jsFiddle I have an interact.js rect that can be resized with a snap of 10px by 10px. The rect is positioned in x = 95px, and when I move the left side to the left, it moves to x = 90x. This is ...
1
vote
1
answer
1k
views
Making interact.js resizable pixel perfect
In this jsFiddle I have an SVG rect that is resizable using interact.js. There's also a 10px by 10px grid and the .resizable function has included a 10px by 10 px snap. The objective is to resize the ...
4
votes
1
answer
613
views
interact.js SVG rect snapping to a div with margins
In this jsFiddle I have an SVG interact.js rect that when resized it snaps to a grid.
This works fine until I start changing margins from zero to a number. The rect is inside a div #mysvg and if I ...
2
votes
1
answer
5k
views
Vue draggable element with a click event on it?
I am making a Tinder clone type app in Vue. I am using the Vue2InteractDraggable component. This component works great for the use case. But I want to have a click event on the draggable portion, ...
1
vote
1
answer
396
views
Clip SVG image with rectangle boundaries when it is resized in D3
In this jsFiddle I combine D3 with interact.js, both working on SVG. There's a group that contains a rect and an image. The group class is resizable and that works fine. The problem is that the rect, ...
0
votes
1
answer
2k
views
Resizing with handles in interact.js + SVG
In this jsFiddle I have an SVG rect that is resized with interact.js. This works fine, however I need to add resize handles n/ne/e/se/s/sw/w/nw, 8x8 pixel squares at each point. These handles should ...
1
vote
0
answers
322
views
vue, svg onmove dragging not work correctly with a ViewBox
I try to make a rectangle draggable. When I add a ViewBox to the svg the drag position is not correct anymore, without it works perfect. I think i need a scale factor. Have someone a solution?
Here ...
2
votes
0
answers
820
views
How to create a new element, then drag it with interactjs?
What I'm trying to do, is create an element from a none-draggable element. Then start dragging the new element from there.
I've seen the examples, and managed to replicate the examples from Interact....
3
votes
1
answer
6k
views
Drag and drop with interact.js
I am trying to build an interface that allows both resize/drag and rotate on some element and to achieve this I am using interact.js javascript library.
I have my interact functions working:
...
2
votes
1
answer
3k
views
Resizing in interact.js
I am trying to learn how to use the interact.js library and I cant get the resizing example to be draggable. I can resize the div ".resize-drag" but I don´t know how to get it draggable. Can anyone ...
1
vote
1
answer
924
views
Interact.js draggables not visible when dragging out of a dropzone with overflow:scroll
I'm building an interact.js app with two dropzones. One begins with all of the draggables in it and is scrollable. When dragging out of the origin dropzone, the draggables become hidden.
I've tried ...
2
votes
1
answer
3k
views
Interact.js resizable and draggable not working together
I have created a fiddle of how my script looks: https://jsfiddle.net/xpvt214o/701253/
This is my code:
HTML:
<div id="_idContainer011" class="tabcontent" data-layer-id="35" data-locked="0" style=...
1
vote
0
answers
531
views
interact.js allowFrom not working for draggable handle outside draggable element
I have this fiddle:
https://jsfiddle.net/xpvt214o/700857/
This is my code:
HTML:
<div id="draggable-element">
test
</div>
<div class="handle">
handle
</div>
JS:
...
1
vote
1
answer
2k
views
prevent click on hyperlink while dragging/holding
I have item div elements with anchor elements as children. The size of the anchor children stretches the parent item element.
I've made the item elements draggable with the library interact.js. The ...
-3
votes
1
answer
361
views
I need to drag and drop some images and need to form a floor plan as html
I just want to create a floor plan with drag,drop,rotate and delete elements and after that need to save the plan in HTML format.
My requirement is that we have to create a floor plan, while going ...
14
votes
3
answers
4k
views
Resizing a rotated item with javascript (interact.js)
I have spent many days trying to make an item resizable that is rotated with interact.js.
This is the code that I have at this moment, I will try to explain the concept.
We have a selector item for ...
0
votes
1
answer
725
views
Delete a widget in javascript
Is it possible to delete a Interact widget.I have exhausted of all the available resources online and still not exactly able to figure out whether we can delete Interact widget.As far as the ...
2
votes
1
answer
323
views
Placing one HTML element(div) over another(li)
I am using Gridster along with Interact.I basically want to add images on the widgets with the help of Interact.For now I am just trying to place the interact widget on the gridster widget.But when I ...
7
votes
2
answers
6k
views
Integrating Interact.js with an Angular Project
I need to use the functionality provided by Interact.js, such as draggable, resizable and such, in an Angular project, but i can't find a solid way of importing it in typescript.
I've read about some ...
6
votes
1
answer
588
views
Use dragula to move objects over canvas
I have a canvas with a background picture. I would like to have objects (buttons or divs) that can move over the canvas.
I have found the perfect solution with interact.js. The first example on the ...
1
vote
2
answers
1k
views
Interactjs resizable feature in Angular 4 (ts file)
I am using interact in Angular 4.
My draggable function works perfectly.
In my resizable method the event cannot supply me any object property apart from currentTarget and target.
In the example at ...
1
vote
1
answer
2k
views
Interact.js: dragging SVG element when using ViewBox
I'm building an application in which I'm hoping to use SVG and interact.js together for drag and drop of SVG elements. My SVG is using a ViewBox in order to scale the graphics correctly on different ...
2
votes
1
answer
976
views
Drag disappears when dragged outside of its base container
I am making an Italian learning website, but I am having difficulties doing the dragging of flash cards out of their container, as it disappears. The website is viewable on github pages and the code ...
2
votes
0
answers
653
views
Issues importing a library
I've recently came across a interact.js, a library that I want to use in one of my projects, but I cant get it to work.
I've installed it via npm
npm install interactjs --save
It shows up in my ...
3
votes
1
answer
3k
views
Interact JS draggable not working
I am attempting to use interact.js for it's draggable/droppable functionality in a web project. However, using the most simple example I can think of, I can't seem to get draggable to do anything. It ...
2
votes
0
answers
1k
views
interactjs - save responsive position
I'm creating a form builder and I'm using interact.js to move elements and change their size. The problem is that when I drag them the design is not responsive anymore. This is the code of the ...