daybrush / moveable

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

Is it possible to move element or group with scrolling? #593

Open rasfront opened 2 years ago

rasfront commented 2 years ago

Hi. Unfortunately when i dragging selected elements and scrolling page them staying on previous position. How it is possible to fix it?

https://user-images.githubusercontent.com/34380690/150003021-cfb51c11-2093-4922-818c-ba8d385b0219.mp4

rasfront commented 2 years ago

So can you tell me how to fix it? @daybrush?

daybrush commented 2 years ago

@Raserad

Use scrollable and scroll, scrollGroup events

onScrollGroup={({ scrollContainer, direction }) => {
  scrollContainer.scrollBy(direction[0] * 10, direction[1] * 10);
}}
AkashTvu commented 1 year ago

@Raserad Can you you please share the above functionality code?

daybrush commented 1 year ago

@Raserad @AkashTvu

See this example: https://daybrush.com/moveable/storybook/index.html?path=/story/support-scroll--scrolling-scrollable

AkashTvu commented 1 year ago

@daybrush @Raserad I need the sample of drag and select the vue-movable items code.

daybrush commented 1 year ago

@Raserad

The tabs contain the code for each framework.

image

select with scroll

https://daybrush.com/selecto/storybook/?path=/story/selecto--select-in-the-scroll-area

drag and select

https://daybrush.com/moveable/storybook/index.html?path=/story/combination-with-other-components--components-selecto

AkashTvu commented 1 year ago

@daybrush Exactly i want like this but there is a problem when i select the single item then its not resizable and another thing is in vue2 code you are using the setup method which should be use in vue3 version. And please help me to share if you have the complete sample code for this. image