Working with Draggables

Working with Draggables


Hi there-
I'm having some troubles working with the draggable ui. I am using the
latest UI available from the Download Tool. (Which appears to be 1.5
B3 based on the name of the file I downloaded) When trying to use the
1.5 B4 full download everything broke (looking through the discussions
it appears that the build came together incorrectly?).
I'm trying to build a "google-maps-like" interface, where my game
board is the map that you can drag and scroll around in. The setup is
to have a "Draggable" map that is too big for the screen, and
contained in a container DIV which would hide the overflow. when the
user clicks and drags, they "pull" themselves around the map by
basically dragging it around the visible part of the container div.
below is a fragment of my html/css/js
HTML:
<div id="PageContent">
<div id="PagePushVert">
</div>
<div id="MapContainer">
<div id="Map">
I am ze map
</div>
</div>
</div>
JS:
$("#Map").draggable();
CSS:
#PagePushVert {
background-color:black;
height:1%;
width:100%;
}
#MapContainer {
background-color:yellow;
height:98%;
width:100%;
overflow:hidden;
position:absolute;
}
#Map {
background-color:red;
height:8000px;
width:8000px;
}
3) When this renders, I get a large red box filling the screen, with
the text "I am ze map" (I'll eventually fill this with the map
contents). In both IE and FF, I can only drag if I click on the text
or on the same line of the text. If I click elsewhere in the div (i.e.
much lower down), I cannot drag.
4) With firefox (2.0.0.14), the Draggable behavior seems to stop after
one or two moves. After that point, I cannot seem to pick it up any
more. Using firebug, I cannot seem to re-enable the draggable
functionality (e.g. by doing .draggable("enable") ). IE (7.0.5730.11)
seems to continue with the dragging behavior (though it is still
annoying that I cannot "pick" the div anywhere but at the top.
5) Looking through the discussion list, it seems that there are
several issues with draggable in 1.5 b4/b3. Is there an old, stable
version that I can work with until this has all been sorted out?