I'm developing a sort of web-based map editor and I'm using JQuery and JQuery-ui. I use the latter principally to make the objects draggable. Objects are created and inserted in the page in a default position as the user clicks on a button. When the object is created i make it draggable.
What happens is that if I create 2 or more objects that overlaps i can drag only the one that is on the top, the others loses their draggability. If I add those objects and I move them somewhere and after i make them overlap there is no probleb, I still can drag them where i want. The problems happens only when the objects overlap when they are created.
Here is the code i wrote.
I use JSGraphics just to draw an icon on the page, it can be found at http://www.walterzorn.de/en/jsgraphics/jsgraphics_e.htm. I really hope that someone can help me understand what happens and what I'm doing wrong! :)
I've tried to add the next object in a different place. I found that if the distance to the previous added object is at least 17px, the bottom one doesn't lose its draggability. No matter if I modify the x or y parameters, it has just to be at least 17px away.