jablonka.czprosek.czf

mapstats

Subversion Repositories:
[/] [mapstats.js] - Diff between revs 6 and 8

Show entire file Ignore whitespace

Rev 6 Rev 8
Line 48... Line 48...
var m6_a; var m6_a;
var m7_a; var m7_a;
var m8_a; var m8_a;
var m9_a; var m9_a;
var cntm; var cntm;
   
  function minmax_scan() {
  if (!document.getElementById('mapstats')) return;
  window.clearInterval(minmax_scanner);
  canvasInit(start_mul);
  }
   
function mapInit(startzoom) { function mapInit(startzoom) {
magnifier = new Magnifier(); magnifier = new Magnifier();
mainMap = new MainMap(startzoom); mainMap = new MainMap(startzoom);
   
Line 170... Line 176...
this.viewPortHeight = inres_y; //400 this.viewPortHeight = inres_y; //400
   
this.tileSize = 256; this.tileSize = 256;
this.f_dragging = false; this.f_dragging = false;
this.innerDiv = document.getElementById("innerDiv"); this.innerDiv = document.getElementById("innerDiv");
this.innerDiv.style.cursor = "url(grab.cur), default"; this.innerDiv.style.cursor = "url('grab.cur'), default";
   
var outerDiv = document.getElementById("outerDiv"); var outerDiv = document.getElementById("outerDiv");
this.outerDiv = outerDiv; this.outerDiv = outerDiv;
outerDiv.style.width = inres_x + "px"; outerDiv.style.width = inres_x + "px";
outerDiv.style.height = inres_y + "px"; outerDiv.style.height = inres_y + "px";
Line 238... Line 244...
if (!event) event = window.event; if (!event) event = window.event;
   
this.dragStartLeft = event.clientX; this.dragStartLeft = event.clientX;
this.dragStartTop = event.clientY; this.dragStartTop = event.clientY;
var innerDiv = this.innerDiv; var innerDiv = this.innerDiv;
innerDiv.style.cursor = "url(grabbing.cur), default"; innerDiv.style.cursor = "url('grabbing.cur'), default";
   
this.top = innerDiv.offsetTop; this.top = innerDiv.offsetTop;
this.left = innerDiv.offsetLeft; this.left = innerDiv.offsetLeft;
   
this.f_dragging = true; this.f_dragging = true;
Line 380... Line 386...
return visibleTiles; return visibleTiles;
} }
   
MainMap.prototype.stopMove = MainMap.prototype.stopMove =
function (event) { function (event) {
this.innerDiv.style.cursor = "url(grab.cur), default"; this.innerDiv.style.cursor = "url('grab.cur'), default";
this.f_dragging = false; this.f_dragging = false;
} }
   
// movement in the magnifier moves main map's view port // movement in the magnifier moves main map's view port
MainMap.prototype.setViewPort = MainMap.prototype.setViewPort =
Line 804... Line 810...
if (navigator.appName=="Microsoft Internet Explorer") { if (navigator.appName=="Microsoft Internet Explorer") {
if(img=="on") { img = imgon; } else { img = imgoff; } if(img=="on") { img = imgon; } else { img = imgoff; }
var ctx = document.getElementById('paint2').getContext('2d'); var ctx = document.getElementById('paint2').getContext('2d');
ctx.drawImage(img,xo,yo); ctx.drawImage(img,xo,yo);
} else { } else {
var text = '<div style="position:absolute;left:' + xo + 'px;top:' + yo + 'px;width: 14px;height: 14px;background-image: url(\'' + img + '.png\');font-size: 0px;cursor: url(grab.cur) default;" unselectable = "on"></div>'; var text = '<div class="grab" style="position:absolute;left:' + xo + 'px;top:' + yo + 'px;width: 14px;height: 14px;background-image: url(\'' + img + '.png\');font-size: 0px;" unselectable = "on"></div>';
titulek = document.getElementById("mapstats_points"); titulek = document.getElementById("mapstats_points");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
} }
   
Line 817... Line 823...
yn = parseInt((yn*nas)-17); yn = parseInt((yn*nas)-17);
if (navigator.appName=="Microsoft Internet Explorer") { if (navigator.appName=="Microsoft Internet Explorer") {
var ctx = document.getElementById('paint').getContext('2d'); var ctx = document.getElementById('paint').getContext('2d');
ctx.drawImage(imgap,xn,yn); ctx.drawImage(imgap,xn,yn);
} else { } else {
var text = '<div style="position:absolute;left:' + xn + 'px;top:' + yn + 'px;width: 62px;height: 34px;background-image: url(\'ap.png\');font-size: 0px;cursor: url(grab.cur) default;" unselectable = "on"></div>'; var text = '<div class="grab" style="position:absolute;left:' + xn + 'px;top:' + yn + 'px;width: 62px;height: 34px;background-image: url(\'ap.png\');font-size: 0px;" unselectable = "on"></div>';
titulek = document.getElementById("mapstats_wave"); titulek = document.getElementById("mapstats_wave");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
} }
   
Line 830... Line 836...
yc = parseInt((yc*nas)-7); yc = parseInt((yc*nas)-7);
if (navigator.appName=="Microsoft Internet Explorer") { if (navigator.appName=="Microsoft Internet Explorer") {
var ctx = document.getElementById('paint').getContext('2d'); var ctx = document.getElementById('paint').getContext('2d');
ctx.drawImage(imgcn,xc,yc); ctx.drawImage(imgcn,xc,yc);
} else { } else {
var text = '<div style="position:absolute;left:' + xc + 'px;top:' + yc + 'px;width: 14px;height: 14px;background-image: url(\'client.png\');font-size: 0px;cursor: url(grab.cur) default;" unselectable = "on"></div>'; var text = '<div class="grab" style="position:absolute;left:' + xc + 'px;top:' + yc + 'px;width: 14px;height: 14px;background-image: url(\'client.png\');font-size: 0px;" unselectable = "on"></div>';
titulek = document.getElementById("mapstats_wave"); titulek = document.getElementById("mapstats_wave");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
} }
   
Line 843... Line 849...
ys = parseInt((ys*nas)-6); ys = parseInt((ys*nas)-6);
if (navigator.appName=="Microsoft Internet Explorer") { if (navigator.appName=="Microsoft Internet Explorer") {
var ctx = document.getElementById('paint').getContext('2d'); var ctx = document.getElementById('paint').getContext('2d');
ctx.drawImage(imgsw,xs,ys); ctx.drawImage(imgsw,xs,ys);
} else { } else {
var text = '<div style="position:absolute;left:' + xs + 'px;top:' + ys + 'px;width: 12px;height: 12px;background-image: url(\'switch.png\');font-size: 0px;cursor: url(grab.cur) default;" unselectable = "on"></div>'; var text = '<div class="grab" style="position:absolute;left:' + xs + 'px;top:' + ys + 'px;width: 12px;height: 12px;background-image: url(\'switch.png\');font-size: 0px;" unselectable = "on"></div>';
titulek = document.getElementById("mapstats_wave"); titulek = document.getElementById("mapstats_wave");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
} }
   
Line 856... Line 862...
yl = parseInt((yl*nas)-7); yl = parseInt((yl*nas)-7);
if (navigator.appName=="Microsoft Internet Explorer") { if (navigator.appName=="Microsoft Internet Explorer") {
var ctx = document.getElementById('paint').getContext('2d'); var ctx = document.getElementById('paint').getContext('2d');
ctx.drawImage(imginfo,xl,yl); ctx.drawImage(imginfo,xl,yl);
} else { } else {
var text = '<div style="position:absolute;left:' + xl + 'px;top:' + yl + 'px;width: 14px;height: 14px;background-image: url(\'info.png\');font-size: 0px;cursor: url(grab.cur) default;" unselectable = "on"></div>'; var text = '<div class="grab" style="position:absolute;left:' + xl + 'px;top:' + yl + 'px;width: 14px;height: 14px;background-image: url(\'info.png\');font-size: 0px;" unselectable = "on"></div>';
titulek = document.getElementById("mapstats_wave"); titulek = document.getElementById("mapstats_wave");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
} }
   
Line 1067... Line 1073...
} }
   
function drawInfo(txt, xa, ya, nas) { function drawInfo(txt, xa, ya, nas) {
xa = parseInt((xa*nas)+6); xa = parseInt((xa*nas)+6);
ya = parseInt((ya*nas)-13); ya = parseInt((ya*nas)-13);
var text = '<div style="position:absolute;white-space:nowrap;letter-spacing: 1px;left:' + xa + 'px;top:' + ya + 'px;font-family: arial;font-size: 9px;background-color: #000000;color: #ffffff;padding-left: 3px;padding-right: 2px;cursor: url(grab.cur) default;" unselectable = "on">' + txt + '</div>'; var text = '<div class="grab" style="position:absolute;white-space:nowrap;letter-spacing: 1px;left:' + xa + 'px;top:' + ya + 'px;font-family: arial;font-size: 9px;background-color: #000000;color: #ffffff;padding-left: 3px;padding-right: 2px;" unselectable = "on">' + txt + '</div>';
   
titulek = document.getElementById("mapstats_infopoint"); titulek = document.getElementById("mapstats_infopoint");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
   
function drawName(txt, xa, ya, nas) { function drawName(txt, xa, ya, nas) {
xa = parseInt((xa*nas)+6); xa = parseInt((xa*nas)+6);
ya = parseInt((ya*nas)-13); ya = parseInt((ya*nas)-13);
var text = '<div style="position:absolute;white-space:nowrap;letter-spacing: 1px;left:' + xa + 'px;top:' + ya + 'px;font-family: arial;font-size: 9px;background-color: #000000;color: #ffffff;padding-left: 3px;padding-right: 2px;cursor: url(grab.cur) default;" unselectable = "on">' + txt + '</div>'; var text = '<div class="grab" style="position:absolute;white-space:nowrap;letter-spacing: 1px;left:' + xa + 'px;top:' + ya + 'px;font-family: arial;font-size: 9px;background-color: #000000;color: #ffffff;padding-left: 3px;padding-right: 2px;" unselectable = "on">' + txt + '</div>';
   
titulek = document.getElementById("mapstats_name"); titulek = document.getElementById("mapstats_name");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
   
function drawIP(txt, xb, yb, nas) { function drawIP(txt, xb, yb, nas) {
xb = parseInt((xb*nas)+6); xb = parseInt((xb*nas)+6);
yb = parseInt((yb*nas)-1); yb = parseInt((yb*nas)-1);
var text = '<div style="position:absolute;white-space:nowrap;letter-spacing: 1px;left:' + xb + 'px;top:' + yb + 'px;font-family: arial;font-size: 9px;background-color: #000000;color: #ffffff;padding-left: 3px;padding-right: 2px;cursor: url(grab.cur) default;" unselectable = "on">' + txt + '</div>'; var text = '<div class="grab" style="position:absolute;white-space:nowrap;letter-spacing: 1px;left:' + xb + 'px;top:' + yb + 'px;font-family: arial;font-size: 9px;background-color: #000000;color: #ffffff;padding-left: 3px;padding-right: 2px;" unselectable = "on">' + txt + '</div>';
   
titulek = document.getElementById("mapstats_ip"); titulek = document.getElementById("mapstats_ip");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
   
function drawStatus(txt, xc, yc, nas) { function drawStatus(txt, xc, yc, nas) {
xc = parseInt((xc*nas)+6); xc = parseInt((xc*nas)+6);
yc = parseInt((yc*nas)+11); yc = parseInt((yc*nas)+11);
var text = '<div style="position:absolute;white-space:nowrap;letter-spacing: 1px;left:' + xc + 'px;top:' + yc + 'px;font-family: arial;font-size: 9px;background-color: #000000;color: #ffffff;padding-left: 3px;padding-right: 2px;cursor: url(grab.cur) default;" unselectable = "on">' + txt + '</div>'; var text = '<div class="grab" style="position:absolute;white-space:nowrap;letter-spacing: 1px;left:' + xc + 'px;top:' + yc + 'px;font-family: arial;font-size: 9px;background-color: #000000;color: #ffffff;padding-left: 3px;padding-right: 2px;" unselectable = "on">' + txt + '</div>';
   
titulek = document.getElementById("mapstats_status"); titulek = document.getElementById("mapstats_status");
titulek.innerHTML = titulek.innerHTML + text; titulek.innerHTML = titulek.innerHTML + text;
} }
   

Powered by WebSVN 2.2.1