vue-draggable-resizable icon indicating copy to clipboard operation
vue-draggable-resizable copied to clipboard

Auto Scrolling while dragging if Viewport is smaller than the Container

Open endeffects opened this issue 7 years ago • 6 comments

If container is larger than viewport, and drag an item passed viewport top/bottom, window should scroll automatically?

endeffects avatar Jun 09 '18 19:06 endeffects

It seems that No, but it would be cool to have a such feature :)

TitanFighter avatar Jun 10 '18 10:06 TitanFighter

+1 for this feature! And it should be careful to scroll it's container in case it's in a scrollable div and not just the page.

richcoleman-alphatrust avatar Feb 20 '19 20:02 richcoleman-alphatrust

I still don't know how to realize a scroll container. This part of the content is out of bounds, I cannot realize a scroll bar, image

plh97 avatar Jul 27 '20 09:07 plh97

Just an idea... When you drag an item, coordinates are changing. Just check coordinate and scroll page by js. For example if a coordinate for top is < 10 px, scroll up for another 10-20-30 px.

TitanFighter avatar Jul 27 '20 19:07 TitanFighter

I want this feature, will try to scroll with js based on the coordinates of the item.

alekbless avatar Oct 12 '21 11:10 alekbless

I need it to work inside a container with a scroll as well

@mauricius my problem is that I have an image under the parent drag area. When :parent = true then it calculates parentWidth on mount. But the image width is wider. F.e. on mounted parent width and height were calculated as 1298x700 but the underlying image is 1600x1000 therefore I have scrolls allowing me to move image to the whole image height/width But rectangles are bound to be initially calculated widht/height of the parent and I cannot move a rectangle to the bottom right corner, as it is out of parent bouns. But I need parent to be the uploaded image width/height.

image

therefore I need to be able to set parentWidth/parentHeight dynamically. but there are no such props.

seyfer avatar Jun 07 '23 14:06 seyfer