daybrush / moveable

Moveable! Draggable! Resizable! Scalable! Rotatable! Warpable! Pinchable! Groupable! Snappable!
https://daybrush.com/moveable/
MIT License
10.08k stars 618 forks source link

scrollable not work #435

Closed gauseen closed 2 years ago

gauseen commented 3 years ago
const moveable = new Moveable(document.body, {
  target: document.querySelector(".target"),
  resizable: true,
  scrollable: true, // not work
  scrollContainer: document.body,
  // scrollThreshold: 0,
  getScrollPosition: ({ scrollContainer }) => {
    console.log("scrollContainer: ", scrollContainer);

    return [scrollContainer.scrollLeft, scrollContainer.scrollTop];
  }
});

DEMO Link: https://codesandbox.io/s/moveable-32mfx?file=/index.html

Description

https://codesandbox.io/s/moveable-32mfx?file=/index.html

daybrush commented 3 years ago

moveable's new version is released. Check it again. Thank you :)