r94064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94063‎ | r94064 | r94065 >
Date:16:28, 8 August 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed zoom parameter for google maps v3
Modified paths:
  • /trunk/extensions/Maps/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/RELEASE-NOTES
@@ -14,6 +14,8 @@
1515
1616 * Use of Validator 0.4.10s setMessage method instead of setDescription for better i18n.
1717
 18+* Fixed zoom parameter for Google Maps v3.
 19+
1820 === Maps 1.0 ===
1921 (2011-07-19)
2022
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js
@@ -5,7 +5,7 @@
66 * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
77 */
88
9 -(function( $ ){ $.fn.googlemaps = function( options ) {
 9+(function( $, mw ){ $.fn.googlemaps = function( options ) {
1010
1111 /**
1212 * All markers that are currently on the map.
@@ -147,11 +147,12 @@
148148 for ( var i = markers.length - 1; i >= 0; i-- ) {
149149 bounds.extend( markers[i].getPosition() );
150150 }
151 -
 151+ }
 152+
 153+ if ( options.zoom === false ) {
152154 map.fitBounds( bounds );
153155 }
154 -
155 - if ( options.zoom !== false ) {
 156+ else {
156157 map.setZoom( options.zoom );
157158 }
158159
@@ -186,4 +187,4 @@
187188
188189 return this;
189190
190 -}; })( jQuery );
\ No newline at end of file
 191+}; })( jQuery, window.mediaWiki );
\ No newline at end of file