aboutsummaryrefslogtreecommitdiffstats
path: root/web/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js.js')
-rw-r--r--web/js.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/web/js.js b/web/js.js
index 47b8a49ee..a4aac70fa 100644
--- a/web/js.js
+++ b/web/js.js
@@ -22,6 +22,11 @@ YAHOO.util.Event.onContentReady('compass', function() {
points[7].onclick = function() { pan(-tilewidth, -tileheight); return false; };
});
+YAHOO.util.Event.onContentReady('map', function() {
+ var dragO = new YAHOO.util.DDMap('map');
+ update_tiles(0, 0, false, true);
+});
+
YAHOO.util.Event.onContentReady('mapForm', function() {
this.onsubmit = function() {
this.x.value = x + 2;
@@ -30,26 +35,12 @@ YAHOO.util.Event.onContentReady('mapForm', function() {
}
});
-var in_drag;
-YAHOO.util.Event.onContentReady('drag', function() {
- var dragO = new YAHOO.util.DDMap('map');
- update_tiles(0, 0, false, true);
-});
-
// I love the global
var tile_x = 0;
var tile_y = 0;
var tilewidth = 254;
var tileheight = 254;
-function drag_check(e) {
- if (in_drag) {
- in_drag=false;
- return false;
- }
- return true;
-}
-
function image_rotate(i, j, x, y) {
var id = 't' + i + '.' + j;
var img = document.getElementById(id);
@@ -191,6 +182,15 @@ function setCursor(s) {
}
}
+var in_drag = false;
+function drag_check(e) {
+ if (in_drag) {
+ in_drag = false;
+ return false;
+ }
+ return true;
+}
+
var mouse_pos = {};
YAHOO.util.DDMap = function(id, sGroup, config) {
if (id) {