interact.js icon indicating copy to clipboard operation
interact.js copied to clipboard

Are inertia options available on the draggable() method?

Open scott-thrillist opened this issue 2 years ago • 1 comments

Looking at the inertia docs here: https://interactjs.io/docs/inertia/

Was hoping I'd be able to customize the throw distance of the inertia feature but doing this doesn't seem to work:

interact(".draggable").draggable({
  inertia: {
    enabled: true,
    resistance: 30,
    minSpeed: 200,
    endSpeed: 100
  },
  modifiers: [
    interact.modifiers.restrictRect({
      restriction: "parent",
      endOnly: true,
    }),
  ],
  autoScroll: true,

  listeners: {
    move: dragMoveListener,
    end(event) {},
  },
});

It just breaks the inertia. Are the options only available for resizable ?

scott-thrillist avatar May 24 '22 20:05 scott-thrillist

They're available for draggable as well. Those values work for me. Can you make a demo on jsfiddle.net/?

taye avatar Jun 10 '22 17:06 taye