Forum Discussion
Drag Items Stuck Behind Targets
I tried too.. Couldnot get it stuck behind a target either. Have to admit though that the look as is, it is quite hard to see what you dragging and dropping where. But as said... i do think it worked as planned.
One solution to things somehow getting stuck behind other elements is changing z-depth.
Some functions i use a lot creating custom Javascript based DragandDrops.var someElement = document.querySelector("[data-acc-text='myElement1']");
var otherElement = document.querySelector("[data-acc-text='myElement2']");
function changeZ(element1,element2,param1,param2){
gsap.set(element1, { css:{zIndex:param1}});
gsap.set(element2, { css:{zIndex:param2}});
}
changeZ(someElement,otherElement,2,-2 );
This way you can change ( or swap ) the z-index, thus it being on top of every Storyline element.