From 971cbef11f559c004d119f7d0047c4a6ecec4276 Mon Sep 17 00:00:00 2001 From: boombuler Date: Wed, 27 Feb 2013 13:04:30 +0100 Subject: [PATCH 1/5] add "nickname" class to all nicknames within the page --- code/chat.js | 2 +- code/portal_detail_display.js | 1 + code/portal_detail_display_tools.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/chat.js b/code/chat.js index 6faea140..153c5105 100644 --- a/code/chat.js +++ b/code/chat.js @@ -347,7 +347,7 @@ window.chat.renderMsg = function(msg, nick, time, team) { var s = 'style="color:'+COLORS[team]+'"'; var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : ''; var i = ['<', '>']; - return ''+t+''+i[0]+''+nick+''+i[1]+''+msg+''; + return ''+t+''+i[0]+''+nick+''+i[1]+''+msg+''; } diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index e73a664a..15dd160e 100644 --- a/code/portal_detail_display.js +++ b/code/portal_detail_display.js @@ -24,6 +24,7 @@ window.renderPortalDetails = function(guid) { var player = d.captured && d.captured.capturingPlayerId ? getPlayerName(d.captured.capturingPlayerId) : null; + player = ''+player+''; var playerText = player ? ['owner', player] : null; var time = d.captured diff --git a/code/portal_detail_display_tools.js b/code/portal_detail_display_tools.js index 2861edf7..9a50e1b7 100644 --- a/code/portal_detail_display_tools.js +++ b/code/portal_detail_display_tools.js @@ -132,6 +132,7 @@ window.renderResonatorDetails = function(slot, level, nrg, dist, nick) { var meter = '' + fill + lbar + ''; } + nick = ''+nick+''; return [meter, nick || '']; } From f664d60da37e09d4a0a4cb429d32bd1774d9304f Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Sat, 2 Mar 2013 00:41:38 +0100 Subject: [PATCH 2/5] most likely fix #355 (thanks @yoshimo) --- dist/leaflet_google.js | 1 + external/leaflet_google.js | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/leaflet_google.js b/dist/leaflet_google.js index 37d6dd8c..85dfef08 100644 --- a/dist/leaflet_google.js +++ b/dist/leaflet_google.js @@ -12,6 +12,7 @@ L.Google = L.Class.extend({ errorTileUrl: '', attribution: '', opacity: 1, + tilt: 0, continuousWorld: false, noWrap: false, }, diff --git a/external/leaflet_google.js b/external/leaflet_google.js index 37d6dd8c..034fb1bc 100644 --- a/external/leaflet_google.js +++ b/external/leaflet_google.js @@ -11,6 +11,7 @@ L.Google = L.Class.extend({ subdomains: 'abc', errorTileUrl: '', attribution: '', + tilt: 0, opacity: 1, continuousWorld: false, noWrap: false, From 4be5efe3065ded26cc84b034c2396bbbb52ce233 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Sat, 2 Mar 2013 00:55:25 +0100 Subject: [PATCH 3/5] really fix #355 previous patch added the option to the wrong hash --- dist/leaflet_google.js | 2 +- external/leaflet_google.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/leaflet_google.js b/dist/leaflet_google.js index 85dfef08..e59c362f 100644 --- a/dist/leaflet_google.js +++ b/dist/leaflet_google.js @@ -12,7 +12,6 @@ L.Google = L.Class.extend({ errorTileUrl: '', attribution: '', opacity: 1, - tilt: 0, continuousWorld: false, noWrap: false, }, @@ -93,6 +92,7 @@ L.Google = L.Class.extend({ var map = new google.maps.Map(this._container, { center: this._google_center, zoom: 0, + tilt: 0, styles: this._styles, mapTypeId: this._type, disableDefaultUI: true, diff --git a/external/leaflet_google.js b/external/leaflet_google.js index 034fb1bc..ac5b9096 100644 --- a/external/leaflet_google.js +++ b/external/leaflet_google.js @@ -11,7 +11,6 @@ L.Google = L.Class.extend({ subdomains: 'abc', errorTileUrl: '', attribution: '', - tilt: 0, opacity: 1, continuousWorld: false, noWrap: false, @@ -94,6 +93,7 @@ L.Google = L.Class.extend({ center: this._google_center, zoom: 0, styles: this._styles, + tilt: 0, mapTypeId: this._type, disableDefaultUI: true, keyboardShortcuts: false, From 9418ac3f86314c80850fa667b4b734bdd43f6f9a Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Sat, 2 Mar 2013 01:11:02 +0100 Subject: [PATCH 4/5] prevent LeafletGoogle from always triggering the resize event on GoogleMaps. This is broken upstream, too, but the author of the project has been unresponsive for the past half year. --- dist/leaflet_google.js | 4 ++-- external/leaflet_google.js | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/leaflet_google.js b/dist/leaflet_google.js index e59c362f..36d6710e 100644 --- a/dist/leaflet_google.js +++ b/dist/leaflet_google.js @@ -139,8 +139,8 @@ L.Google = L.Class.extend({ _resize: function() { var size = this._map.getSize(); - if (this._container.style.width == size.x && - this._container.style.height == size.y) + if (parseInt(this._container.style.width) == size.x && + parseInt(this._container.style.height) == size.y) return; this._container.style.width = size.x + 'px'; this._container.style.height = size.y + 'px'; diff --git a/external/leaflet_google.js b/external/leaflet_google.js index ac5b9096..c4c323e9 100644 --- a/external/leaflet_google.js +++ b/external/leaflet_google.js @@ -139,11 +139,13 @@ L.Google = L.Class.extend({ _resize: function() { var size = this._map.getSize(); - if (this._container.style.width == size.x && - this._container.style.height == size.y) + if (parseInt(this._container.style.width) == size.x && + parseInt(this._container.style.height) == size.y) return; + this._container.style.width = size.x + 'px'; this._container.style.height = size.y + 'px'; + google.maps.event.trigger(this._google, "resize"); }, From bc7de777a207593b714db816605db098b0533ba1 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Sat, 2 Mar 2013 01:52:32 +0100 Subject: [PATCH 5/5] =?UTF-8?q?-=20disable=20Leaflet=E2=80=99s=20zoom=20an?= =?UTF-8?q?imation=20for=20GMaps=20Layers.=20It=20was=20wrong=20=20=20anyw?= =?UTF-8?q?ay=20and=20due=20to=20the=20way=20Leaflet/GMaps=20worked,=20lat?= =?UTF-8?q?ter=20only=20=20=20started=20zooming=20after=20former=20was=20f?= =?UTF-8?q?inished,=20making=20zooming=20very=20=20=20slow.=20This=20is=20?= =?UTF-8?q?an=20experimental=20change.=20Please=20report=20if=20you=20have?= =?UTF-8?q?=20=20=20problems.=20-=20remove=20superfluous=20calls=20in=20Le?= =?UTF-8?q?afletGoogle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- external/leaflet_google.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/external/leaflet_google.js b/external/leaflet_google.js index c4c323e9..d25c7f36 100644 --- a/external/leaflet_google.js +++ b/external/leaflet_google.js @@ -36,12 +36,11 @@ L.Google = L.Class.extend({ this._initContainer(); this._initMapObject(); - // set up events - map.on('viewreset', this._resetCallback, this); + this._map.options.zoomAnimation = false; - this._limitedUpdate = L.Util.limitExecByInterval(this._update, 150, this); + // set up events + //~ map.on('viewreset', this._resetCallback, this); map.on('move', this._update, this); - //map.on('moveend', this._update, this); this._reset(); this._update(); @@ -51,7 +50,8 @@ L.Google = L.Class.extend({ this._map._container.removeChild(this._container); //this._container = null; - this._map.off('viewreset', this._resetCallback, this); + //~ this._map.off('viewreset', this._resetCallback, this); + this._map.options.zoomAnimation = true; this._map.off('move', this._update, this); //this._map.off('moveend', this._update, this); @@ -122,19 +122,11 @@ L.Google = L.Class.extend({ _update: function() { this._resize(); - var bounds = this._map.getBounds(); - var ne = bounds.getNorthEast(); - var sw = bounds.getSouthWest(); - var google_bounds = new google.maps.LatLngBounds( - new google.maps.LatLng(sw.lat, sw.lng), - new google.maps.LatLng(ne.lat, ne.lng) - ); var center = this._map.getCenter(); var _center = new google.maps.LatLng(center.lat, center.lng); this._google.setCenter(_center); this._google.setZoom(this._map.getZoom()); - //this._google.fitBounds(google_bounds); }, _resize: function() {