I am making an application where i can drag a "monster" i drew from one tile into another. But when i want to drag from the div where i created the monster into the actual board the first div just expands instead, it looks like the image is moving under the other div but i dont think thats what is happening.
The tile on the left is where the image was originally, a bit on the right are the tiles i want it to go. In the first picture the image is on my mouse, as it should be. In the second picture my mouse is a bit to the right but as you can see the image seems to go "under" the div to the right, but actually it just expands the current div.
Ive tried looking for answers but i would have no idea how to name this problem. These images visualise the problem a bit. Ive already tried setting a max width but to no effect. https://imgur.com/cOLP034 https://imgur.com/w6rTjpG
This happens when the "object/image" moves
function moveAt(pageX, pageY) {
let configuratorOffsetHeight = configuratorFormOffsetHeight - event.pageY + configuratorHeaderOffsetHeight;
value.style.left = pageX - shiftX + 'px';
value.style.top = pageY + configuratorOffsetHeight - shiftY + 'px';
}
Aucun commentaire:
Enregistrer un commentaire