'allowFrom' does not exist in type 'DraggableOptions'.
See original GitHub issueFollowing the example in the documentation for using allowFrom and downloading the latest stable using npm (1.3.3) in an angular application this error is displayed during compiling
Expected behavior
Allow the use of a button as the allowable drag able trigger
Actual behavior
An error is displayed during compiling: ‘allowFrom’ does not exist in type ‘DraggableOptions’.
import * as interact from 'interactjs';
interact('.draggable')
.draggable({
inertia: false,
allowFrom: '[drag-handle]',
onmove: this.dragMoveListener,
});
On investigation it seems to be missing this form the index.d.ts file, when adding this as an option the code works as intended
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Drag area is smaller than element · Issue #676 · taye/interact.js
We have a simple box, where it's head area is draggable. The head is a separate DIV container. It contains some input fields,...
Read more >Issue with jQuery UI Drag & Drop - Won't allow drop in ...
The problem is you're using the text() function to get/set the textarea value, what you really want is val() . Also, I don't...
Read more >Common Action Options - interact.js
This option available for drag, resize and gesture, as well as pointerEvents (down, move, hold, etc.). Using the allowFrom option, you may specify...
Read more >Draggable Widget - jQuery UI API Documentation
Constrains dragging to within the bounds of the specified element or region. Multiple types supported: Selector: The draggable element will be contained to...
Read more >How To Create Drag and Drop Elements with Vanilla ...
In this tutorial, we will build a drag-and-drop example using the HTML ... However, there may be situations where a library is not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@angeenes probably not for another month at least. I still have a lot of documentation to write. You can
npm install interactjs@next
for now.I’m closing this as the typing issues have been resolved in the latest 1.4.0-alpha releases. I’d still really appreciate help with the docs! A short list of article headings and examples for a new guide would be a great place to start. Shout at me (nicely) in https://gitter.im/taye/interact.js.