Drag and drop returns decimal position
I have a problem with the drag and drop feature. The ui.position.left
is sometimes a decimal number. The value seems to be correct, except
that it ends at .5 (e.g. 30.5). Especially Internet Explorer does not
like pixels with decimals and it does not display the clone when
dragged.
This only happens at some machines. I cannot figure out why. Could it
have anything to do with the language of the browser (some use ',' as
decimal separator).
I use jQuery-1.3.2 and jquery-ui-1.7.1.
I have the following drag and drop implementation.
jQuery("#HotspotButton").draggable({
appendTo: '.UPDATE_hotspots',
helper: 'clone',
cursorAt: {top:15,left:15},
zIndex: 2000
});
jQuery(".UPDATE_hotspots").droppable({
accept: "#HotspotButton",
drop: function(e,ui) {
AddNewHotspot(this,ui);
}
});
Thank you very much for any hints. Any idea, where the position comes
from. Is is browser dependent?
Best regards
Lisbeth