jablonka.czprosek.czf

mapstats

Subversion Repositories:
[/] [mapstats.js] - Diff between revs 1 and 4

Show entire file Ignore whitespace

Rev 1 Rev 4
Line 1... Line 1...
// -------------------------------------------------------- // --------------------------------------------------------
// This script made JKLIR as. Unreal][ [http://jklir.net] // This script made JKLIR as. Unreal][ [http://jklir.net]
// Map originally from Emcee Lam [http://sjsutech.com] // Map engine originally from Emcee Lam [http://sjsutech.com]
// Licence: GNU/GPL // Licence: GNU/GPL
// (c) 2008 All rights reserved // (c) 2008 All rights reserved
// -------------------------------------------------------- // --------------------------------------------------------
   
var mainMap; var mainMap;
Line 79... Line 79...
function (event) { function (event) {
// for IE // for IE
if (!event) if (!event)
event = window.event; event = window.event;
   
//var magnifierDiv = document.getElementById("magnifier"); var magnifierDiv = document.getElementById("magnifier");
var magnifierDiv = this.div; //var magnifierDiv = this.div;
this.dragStartLeft = event.clientX; this.dragStartLeft = event.clientX;
this.dragStartTop = event.clientY; this.dragStartTop = event.clientY;
magnifierDiv.style.cursor = "move"; //magnifierDiv.style.cursor = "move";
   
this.top = magnifierDiv.offsetTop; this.top = magnifierDiv.offsetTop;
this.left = magnifierDiv.offsetLeft; this.left = magnifierDiv.offsetLeft;
   
this.f_dragging = true; this.f_dragging = true;
Line 123... Line 123...
} }
} }
   
Magnifier.prototype.stopMove = Magnifier.prototype.stopMove =
function (event) { function (event) {
this.div.style.cursor = ""; //this.div.style.cursor = "";
this.f_dragging = false; this.f_dragging = false;
} }
   
Magnifier.prototype.setSize = Magnifier.prototype.setSize =
function (innerDivWidth, innerDivHeight) { function (innerDivWidth, innerDivHeight) {
Line 167... Line 167...
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";
   
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 234... Line 235...
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 = "move"; 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 372... Line 373...
return visibleTiles; return visibleTiles;
} }
   
MainMap.prototype.stopMove = MainMap.prototype.stopMove =
function (event) { function (event) {
this.innerDiv.style.cursor = ""; 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 551... Line 552...
if(pomocna2.length>0) { if(pomocna2.length>0) {
pozdrav3 = pomocna2.split('\n'); pozdrav3 = pomocna2.split('\n');
for(a=0;a<pozdrav3.length;a++){ for(a=0;a<pozdrav3.length;a++){
if(pozdrav3[a]!="") { if(pozdrav3[a]!="") {
pozdrav4 = pozdrav3[a].split(';'); pozdrav4 = pozdrav3[a].split(';');
if(pozdrav4[1].toLowerCase()=="backbone") { size = 4.5; } else { size = 3; } if(pozdrav4[1].toLowerCase()=="backbone") { size = 4.5; } else { size = 2.7; }
if(pozdrav4[2].toLowerCase()=="inp") { if(pozdrav4[2].toLowerCase()=="inp") {
if(pozdrav4[3]==1) { clrlnk = wifi_client_a; m1_a = 1; } if(pozdrav4[3]==1) { clrlnk = wifi_client_a; m1_a = 1; }
else if(pozdrav4[3]==2) { clrlnk = wifi_backbone_a; m2_a = 1; } else if(pozdrav4[3]==2) { clrlnk = wifi_backbone_a; m2_a = 1; }
else if(pozdrav4[3]==3) { clrlnk = eth_100_a; m3_a = 1; } else if(pozdrav4[3]==3) { clrlnk = eth_100_a; m3_a = 1; }
else if(pozdrav4[3]==4) { clrlnk = fso_a; m4_a = 1; } else if(pozdrav4[3]==4) { clrlnk = fso_a; m4_a = 1; }
Line 583... Line 584...
} }
} else { } else {
if((ch_backbone) && (size==4.5)) { if((ch_backbone) && (size==4.5)) {
drawLink(pozdrav4[0], size, nasobek, clrlnk); drawLink(pozdrav4[0], size, nasobek, clrlnk);
} }
if((ch_client) && (size==3)) { if((ch_client) && (size==2.7)) {
drawLink(pozdrav4[0], size, nasobek, clrlnk); drawLink(pozdrav4[0], size, nasobek, clrlnk);
} }
} }
} }
} }
Line 810... Line 811...
var paintlegend = document.getElementById('paintlegend'); var paintlegend = document.getElementById('paintlegend');
paintlegend.height = (((cntm-1) * 12)+13); paintlegend.height = (((cntm-1) * 12)+13);
paintlegend.width = "25"; paintlegend.width = "25";
var ctx = paintlegend.getContext('2d'); var ctx = paintlegend.getContext('2d');
ctx.clearRect(0,0,25,((cntm-1) * 12)+13); ctx.clearRect(0,0,25,((cntm-1) * 12)+13);
if(m1==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,wifi_client,3); name = name + name1 + "<br/>"; cislo++; } if(m1==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,wifi_client,2.9); name = name + name1 + "<br/>"; cislo++; }
if(m2==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,wifi_backbone,4.5); name = name + name2 + "<br/>"; cislo++; } if(m2==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,wifi_backbone,4.5); name = name + name2 + "<br/>"; cislo++; }
if(m3==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,eth_100,4.5); name = name + name3 + "<br/>"; cislo++; } if(m3==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,eth_100,4.5); name = name + name3 + "<br/>"; cislo++; }
if(m4==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,fso,4.5); name = name + name4 + "<br/>"; cislo++; } if(m4==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,fso,4.5); name = name + name4 + "<br/>"; cislo++; }
if(m5==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,fso_backup,4.5); name = name + name5 + "<br/>"; cislo++; } if(m5==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,fso_backup,4.5); name = name + name5 + "<br/>"; cislo++; }
if(m6==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,ghz5,4.5); name = name + name6 + "<br/>"; cislo++; } if(m6==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,ghz5,4.5); name = name + name6 + "<br/>"; cislo++; }
if(m7==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,ghz10,4.5); name = name + name7 + "<br/>"; cislo++; } if(m7==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,ghz10,4.5); name = name + name7 + "<br/>"; cislo++; }
if(m8==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,fiber,4.5); name = name + name8 + "<br/>"; cislo++; } if(m8==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,fiber,4.5); name = name + name8 + "<br/>"; cislo++; }
if(m9==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,other,4.5); name = name + name9 + "<br/>"; cislo++; } if(m9==1) { epsilon = ((cislo*12)+5); drawLegendLink(epsilon,other,4.5); name = name + name9 + "<br/>"; cislo++; }
if(m1_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,wifi_client_a,3); name = name + name1 + " " + inp + "<br/>"; cislo++; } if(m1_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,wifi_client_a,2.9); name = name + name1 + " " + inp + "<br/>"; cislo++; }
if(m2_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,wifi_backbone_a,4.5); name = name + name2 + " " + inp + "<br/>"; cislo++; } if(m2_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,wifi_backbone_a,4.5); name = name + name2 + " " + inp + "<br/>"; cislo++; }
if(m3_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,eth_100_a,4.5); name = name + name3 + " " + inp + "<br/>"; cislo++; } if(m3_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,eth_100_a,4.5); name = name + name3 + " " + inp + "<br/>"; cislo++; }
if(m4_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,fso_a,4.5); name = name + name4 + " " + inp + "<br/>"; cislo++; } if(m4_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,fso_a,4.5); name = name + name4 + " " + inp + "<br/>"; cislo++; }
if(m5_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,fso_backup_a,4.5); name = name + name5 + " " + inp + "<br/>"; cislo++; } if(m5_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,fso_backup_a,4.5); name = name + name5 + " " + inp + "<br/>"; cislo++; }
if(m6_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,ghz5_a,4.5); name = name + name6 + " " + inp + "<br/>"; cislo++; } if(m6_a==1) { epsilon = ((cislo*12)+5); drawLegendINPLink(epsilon,ghz5_a,4.5); name = name + name6 + " " + inp + "<br/>"; cislo++; }
Line 858... Line 859...
   
} }
   
function drawLegendINPLink(yg,color,size) { function drawLegendINPLink(yg,color,size) {
var ctx = document.getElementById('paintlegend').getContext('2d'); var ctx = document.getElementById('paintlegend').getContext('2d');
  ctx.strokeStyle = "rgba(255, 255, 255, 0.5)";
  ctx.lineWidth = size;
  ctx.beginPath();
  ctx.moveTo(1,yg);
  ctx.lineTo(24,yg);
  ctx.stroke();
   
ctx.strokeStyle = "rgba(0, 0, 0, 0.1)"; ctx.strokeStyle = "rgba(0, 0, 0, 0.1)";
ctx.lineWidth = size; ctx.lineWidth = size;
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(1,yg); ctx.moveTo(1,yg);
ctx.lineTo(24,yg); ctx.lineTo(24,yg);
Line 915... Line 923...
   
function getFile(url) { function getFile(url) {
AJAX = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : false)); AJAX = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : false));
if (AJAX) { if (AJAX) {
AJAX.open("GET", url, false); AJAX.open("GET", url, false);
  AJAX.setRequestHeader("Cache-Control", "no-store");
  AJAX.setRequestHeader("Cache-Control", "no-cache");
  AJAX.setRequestHeader("Cache-Control", "must-revalidate");
  AJAX.setRequestHeader("Pragma", "no-cache");
AJAX.send(null); AJAX.send(null);
return AJAX.responseText; return AJAX.responseText;
} else { } else {
return false; return false;
} }

Powered by WebSVN 2.2.1