Ignore:
Timestamp:
Apr 30, 2007, 12:42:17 PM (14 years ago)
Author:
Nick Burch
Message:

Add in overflow stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/london.npemap.org.uk/index.html

    r536 r539  
    4646
    4747        // We scaled the image so there are 24 pixes per image
    48         var tile_x = Math.round(x/24);
    49         var tile_y = Math.round(y/24);
     48        var tile_x = Math.floor(x/24);
     49        var tile_y = Math.floor(y/24);
    5050        var tile_x_offset = x - (tile_x*24);
    5151        var tile_y_offset = y - (tile_y*24);
    52 
    53         // Always seem to be 1 tile too far to the right, and 1 too high
    54         tile_x -= 1;
    55         tile_y -= 1;
    5652
    5753        location.href="/tiles.html#"+tile_x+","+tile_y+",1";
Note: See TracChangeset for help on using the changeset viewer.