Hello ! ?
After some research I fixed the problems I had. for the proxy I moved the style setting into the OnPressInit function in order to always refresh size and position of the proxy before dragging.
onPressInit() {
...
gsap.set(proxy, {width: Image.offsetWidth, height: Image.offsetHeight, position: "absolute", pointerEvents: "none", top: Image.offsetTop, left: Image.offsetLeft, border: "1px solid red"});
},
I disabled zIndexBoost because it was affecting the proxy divs and not the images. Also I added this OnDragStart function to reinitiate zIndex of all images to 1 first, and then set the zIndex of actual dragged image to 2.
onDragStart() {
gsap.timeline()
.set(".img-drag", {zIndex: 1})
.set(Image, {zIndex: 2});
},
2022-04-09_18-18-59.mp4
Thank you again all for your help and support, I really appreciated it ! ?
https://codepen.io/benjamOD2/pen/GRydOmN