glide icon indicating copy to clipboard operation
glide copied to clipboard

Is it possible to prevent an image moving when dragging?

Open javedbartlett opened this issue 3 years ago • 6 comments

I have dragThreshold enabled and everything works great. I just don't want the image to move when dragging, i'd like it to instantly switch to the next image instead of having the image move slightly beforehand. This is causing the next slide to be anchored to where the previous slide moved to before it moved to the next slide.

Is this possible?

javedbartlett avatar Nov 17 '22 06:11 javedbartlett

Just a friendly bump :) @jedrzejchalubek

javedbartlett avatar Dec 08 '22 16:12 javedbartlett

Hi @javedbartlett , to prevent an image from being dragged away, you can use the draggable global attribute, MDN. <img draggable="false" .. />

ilpert avatar Dec 13 '22 23:12 ilpert

Hi @ilpert , I'd like it to be draggable, so that the image transitions when dragging. However, I dont want the animation of the image moving - if that makes sense?

javedbartlett avatar Dec 15 '22 18:12 javedbartlett

Hi @javedbartlett, had the same problem as you and using the draggable attribute I've managed to solve it . Make a try

ilpert avatar Dec 18 '22 17:12 ilpert

hey @ilpert, would you mind elaborating on how you used the attribute?

javedbartlett avatar Jan 20 '23 00:01 javedbartlett

hey @ilpert, would you mind elaborating on how you used the attribute?

Hi, you can use the attribute like this <img draggable="false" src="xxx".jpg />

ilpert avatar Jan 20 '23 15:01 ilpert