more work on new render code. the new request class is now used - things are almost working right again

still need to change map refresh timer, add back resonators, and write a plugin for field MU count display
This commit is contained in:
Jon Atkins
2013-08-27 02:43:58 +01:00
parent 2c1b5fc06f
commit de432a0aa3
3 changed files with 122 additions and 263 deletions

View File

@ -15,7 +15,7 @@ window.RenderDebugTiles.prototype.reset = function() {
}
window.RenderDebugTiles.prototype.create = function(id,bounds) {
var s = {color: '#000', weight: 3, opacity: 0.7, fillColor: '#000', fillOpacity: 0.5, clickable: false};
var s = {color: '#666', weight: 3, opacity: 0.4, fillColor: '#666', fillOpacity: 0.2, clickable: false};
var bounds = new L.LatLngBounds(bounds);
bounds = bounds.pad(-0.02);
@ -28,7 +28,21 @@ window.RenderDebugTiles.prototype.create = function(id,bounds) {
window.RenderDebugTiles.prototype.setColour = function(id,bordercol,fillcol) {
var l = this.debugTileToRectangle[id];
if (l) {
var s = {color: bordercol, weight: 3, opacity: 0.3, fillColor: fillcol, fillOpacity: 0.1, clickable: false};
var s = {color: bordercol, weight: 3, opacity: 0.4, fillColor: fillcol, fillOpacity: 0.2, clickable: false};
l.setStyle(s);
}
}
window.RenderDebugTiles.prototype.setState = function(id,state) {
var col = '#666';
var fill = '#666';
switch(state) {
case 'ok': col='#0f0'; fill='#0f0'; break;
case 'error': col='#f00'; fill='#f00'; break;
case 'cache-fresh': col='#0f0'; fill='#ff0'; break;
case 'cache-stale': col='#f00'; fill='#ff0'; break;
case 'requested': col='#00f'; fill='#00f'; break;
case 'retrying': col='#666'; fill='#666'; break;
}
this.setColour (id, col, fill);
}