jenkins-bot has submitted this change and it was merged.
Change subject: Lazyload map marker popup content
......................................................................
Lazyload map marker popup content
Change-Id: I8b53b757f186a94eca1d07e9bfc38c5147cfed2e
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 9 insertions(+), 5 deletions(-)
Approvals:
Smalyshev: Looks good to me, approved
jenkins-bot: Verified
diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index 0281012..b06832f 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -82,12 +82,16 @@
if( !longLat[0] || !longLat[1] ||
isNaN( longLat[0] ) ){
return true;
}
- var info = self._getItemDescription( rowKey );
- markers.push(
- L.circle( [ longLat[0],
longLat[1] ], 10 )
- .bindPopup( info[0] )
- );
+ var popup = L.popup(),
+ marker = L.circle( [ longLat[0],
longLat[1] ], 10 ).bindPopup( popup );
+
+ marker.on( 'click', function() {
+ var info = self._getItemDescription(
rowKey );
+ popup.setContent( info[0] );
+ } );
+
+ markers.push( marker );
}
} );
} );
--
To view, visit https://gerrit.wikimedia.org/r/277088
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8b53b757f186a94eca1d07e9bfc38c5147cfed2e
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits