aboutsummaryrefslogtreecommitdiffstats
path: root/web/js.js
diff options
context:
space:
mode:
authormatthew <matthew>2008-01-10 14:05:20 +0000
committermatthew <matthew>2008-01-10 14:05:20 +0000
commitd5833bd4c1b2c03e794e9067ad0e5bc5c3a1c128 (patch)
treefe862fa61eb33c6d287d99479af74b2858cd76b1 /web/js.js
parent23a1922919a221f1a2fe38b42fce5ba686d81fcb (diff)
3 days rather than 1; slightly quicker JS.
Diffstat (limited to 'web/js.js')
-rw-r--r--web/js.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/js.js b/web/js.js
index bad1d4cc8..6e44ec599 100644
--- a/web/js.js
+++ b/web/js.js
@@ -149,7 +149,7 @@ function update_tiles(dx, dy, force) {
y -= vertical;
tile_y += vertical;
- var url = '/tilma/tileserver/10k-full/' + x + '-' + (x+5) + ',' + y + '-' + (y+5) + '/JSON';
+ var url = [ '/tilma/tileserver/10k-full/', x, '-', (x+5), ',', y, '-', (y+5), '/JSON' ].join('');
var req = YAHOO.util.Connect.asyncRequest('GET', url, {
success: urls_loaded, failure: urls_not_loaded,
argument: [tile_x, tile_y]
@@ -167,7 +167,7 @@ function urls_loaded(o) {
for (var j=0; j<6; j++) {
if (tiles[i][j] == null) continue;
var jj = (j + o.argument[0]);
- var id = 't'+ii+'.'+jj;
+ var id = [ 't', ii, '.', jj ].join('');
var xx = x+j;
var yy = y+5-i;
var img = document.getElementById(id);
@@ -180,7 +180,7 @@ function urls_loaded(o) {
img = cloneNode();
img.style.top = ((ii-2)*tileheight) + 'px';
img.style.left = ((jj-2)*tilewidth) + 'px';
- img.name = 'tile_' + xx + '.' + yy;
+ img.name = [ 'tile_', xx, '.', yy ].join('')
img.id = id;
if (browser) {
img.style.visibility = 'hidden';