question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'allowFrom' does not exist in type 'DraggableOptions'.

See original GitHub issue

Following 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:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tayecommented, Oct 21, 2018

@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.

0reactions
tayecommented, Feb 2, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found