diff options
author | matthew <matthew> | 2007-01-19 23:26:32 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-01-19 23:26:32 +0000 |
commit | ecec90ddc0192c4e4e93188e49a2d5f80365f1b2 (patch) | |
tree | 390a5aa1415ce0bdb3a97199416380d7d6648525 /web/js.js | |
parent | 58b8413ad19c5b21f3c782dbde97d7af24bb86ff (diff) |
Tiny bugfix.
Diffstat (limited to 'web/js.js')
-rw-r--r-- | web/js.js | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -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) { |