Index: branches/Maps0.8/Maps_Settings.php |
— | — | @@ -151,6 +151,8 @@ |
152 | 152 | # when the user does not provide one. |
153 | 153 | $egMapsDefaultTitle = ''; |
154 | 154 | $egMapsDefaultLabel = ''; |
| 155 | + |
| 156 | + $egMapsResizableByDefault = false; |
155 | 157 | |
156 | 158 | |
157 | 159 | |
Index: branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js |
— | — | @@ -126,6 +126,10 @@ |
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
| 130 | + if ( options.resizable ) { |
| 131 | + this.resizable() |
| 132 | + } |
| 133 | + |
130 | 134 | return this; |
131 | 135 | |
132 | 136 | }; })( jQuery ); |
\ No newline at end of file |
Index: branches/Maps0.8/includes/services/GoogleMaps3/GoogleMaps3.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.maps.googlemaps3'] = array( |
25 | | - 'dependencies' => array( 'ext.maps.common' ), |
| 25 | + 'dependencies' => array( 'ext.maps.common', 'jquery.ui.resizable' ), |
26 | 26 | 'localBasePath' => dirname( __FILE__ ), |
27 | 27 | 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps3', |
28 | 28 | 'group' => 'ext.maps', |
Index: branches/Maps0.8/includes/services/GoogleMaps3/Maps_GoogleMaps3.php |
— | — | @@ -82,6 +82,7 @@ |
83 | 83 | public function addParameterInfo( array &$params ) { |
84 | 84 | global $egMapsGMaps3Type, $egMapsGMaps3Types, $egMapsGMaps3Controls, $egMapsGMaps3Layers; |
85 | 85 | global $egMapsGMaps3DefTypeStyle, $egMapsGMaps3DefZoomStyle, $egMapsGMaps3AutoInfoWindows; |
| 86 | + global $egMapsResizableByDefault; |
86 | 87 | |
87 | 88 | $params['zoom']->addCriteria( new CriterionInRange( 0, 20 ) ); |
88 | 89 | $params['zoom']->setDefault( self::getDefaultZoom() ); |
— | — | @@ -123,7 +124,10 @@ |
124 | 125 | //$params['kml']->addManipulations( new MapsParamFile() ); |
125 | 126 | |
126 | 127 | $params['fusiontables'] = new ListParameter( 'fusiontables' ); |
127 | | - $params['fusiontables']->setDefault( array() ); |
| 128 | + $params['fusiontables']->setDefault( array() ); |
| 129 | + |
| 130 | + $params['resizable'] = new Parameter( 'resizable', Parameter::TYPE_BOOLEAN ); |
| 131 | + $params['resizable']->setDefault( $egMapsResizableByDefault, false ); |
128 | 132 | } |
129 | 133 | |
130 | 134 | /** |
Index: branches/Maps0.8/includes/services/YahooMaps/Maps_YahooMaps.php |
— | — | @@ -43,7 +43,8 @@ |
44 | 44 | * @since 0.7 |
45 | 45 | */ |
46 | 46 | public function addParameterInfo( array &$params ) { |
47 | | - global $egMapsYahooAutozoom, $egMapsYahooMapsType, $egMapsYahooMapsTypes, $egMapsYahooMapsZoom, $egMapsYMapControls; |
| 47 | + global $egMapsYahooAutozoom, $egMapsYahooMapsType, $egMapsYahooMapsTypes; |
| 48 | + global $egMapsYahooMapsZoom, $egMapsYMapControls, $egMapsResizableByDefault; |
48 | 49 | |
49 | 50 | $params['zoom']->addCriteria( new CriterionInRange( 1, 13 ) ); |
50 | 51 | $params['zoom']->setDefault( self::getDefaultZoom() ); |
— | — | @@ -82,6 +83,9 @@ |
83 | 84 | Parameter::TYPE_BOOLEAN, |
84 | 85 | $egMapsYahooAutozoom |
85 | 86 | ); |
| 87 | + |
| 88 | + $params['resizable'] = new Parameter( 'resizable', Parameter::TYPE_BOOLEAN ); |
| 89 | + $params['resizable']->setDefault( $egMapsResizableByDefault, false ); |
86 | 90 | } |
87 | 91 | |
88 | 92 | /** |
Index: branches/Maps0.8/includes/services/YahooMaps/YahooMaps.php |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.maps.yahoomaps'] = array( |
| 25 | + 'dependencies' => array( 'ext.maps.common', 'jquery.ui.resizable' ), |
25 | 26 | 'localBasePath' => dirname( __FILE__ ), |
26 | 27 | 'remoteBasePath' => $egMapsScriptPath . '/includes/services/YahooMaps', |
27 | 28 | 'group' => 'ext.maps', |
Index: branches/Maps0.8/includes/services/YahooMaps/jquery.yahoomaps.js |
— | — | @@ -76,6 +76,10 @@ |
77 | 77 | |
78 | 78 | if ( options.centre !== false ) map.drawZoomAndCenter( new YGeoPoint( options.centre.lat, options.centre.lon ) ); |
79 | 79 | |
| 80 | + if ( options.resizable ) { |
| 81 | + this.resizable() |
| 82 | + } |
| 83 | + |
80 | 84 | /** |
81 | 85 | * Returns YMarker object on the provided location. |
82 | 86 | * It will show a popup baloon with title and label when clicked, if either of these is set. |
Index: branches/Maps0.8/includes/services/OpenLayers/Maps_OpenLayers.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | * @since 0.7 |
33 | 33 | */ |
34 | 34 | public function addParameterInfo( array &$params ) { |
35 | | - global $egMapsOLLayers, $egMapsOLControls; |
| 35 | + global $egMapsOLLayers, $egMapsOLControls, $egMapsResizableByDefault; |
36 | 36 | |
37 | 37 | $params['zoom']->addCriteria( new CriterionInRange( 0, 19 ) ); |
38 | 38 | $params['zoom']->setDefault( self::getDefaultZoom() ); |
— | — | @@ -48,6 +48,9 @@ |
49 | 49 | $params['layers']->setDoManipulationOfDefault( true ); |
50 | 50 | $params['layers']->addCriteria( new CriterionOLLayer() ); |
51 | 51 | $params['layers']->setDefault( $egMapsOLLayers ); |
| 52 | + |
| 53 | + $params['resizable'] = new Parameter( 'resizable', Parameter::TYPE_BOOLEAN ); |
| 54 | + $params['resizable']->setDefault( $egMapsResizableByDefault, false ); |
52 | 55 | } |
53 | 56 | |
54 | 57 | /** |
Index: branches/Maps0.8/includes/services/OpenLayers/OpenLayers.php |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.maps.openlayers'] = array( |
| 25 | + 'dependencies' => array( 'ext.maps.common', 'jquery.ui.resizable' ), |
25 | 26 | 'localBasePath' => dirname( __FILE__ ), |
26 | 27 | 'remoteBasePath' => $egMapsScriptPath . '/includes/services/OpenLayers', |
27 | 28 | 'group' => 'ext.maps', |
Index: branches/Maps0.8/includes/services/OpenLayers/jquery.openlayers.js |
— | — | @@ -65,11 +65,14 @@ |
66 | 66 | map.setCenter( centre ); |
67 | 67 | } |
68 | 68 | |
69 | | - |
70 | 69 | if ( options.zoom !== false ) { |
71 | 70 | map.zoomTo( options.zoom ); |
72 | | - } |
| 71 | + } |
73 | 72 | |
| 73 | + if ( options.resizable ) { |
| 74 | + this.resizable() |
| 75 | + } |
| 76 | + |
74 | 77 | function addControls( map, controls, mapElement ) { |
75 | 78 | // Add the controls. |
76 | 79 | for ( var i = controls.length - 1; i >= 0; i-- ) { |
Index: branches/Maps0.8/includes/services/GoogleMaps/GoogleMaps.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.maps.googlemaps2'] = array( |
25 | | - 'dependencies' => array( 'ext.maps.common' ), |
| 25 | + 'dependencies' => array( 'ext.maps.common', 'jquery.ui.resizable' ), |
26 | 26 | 'localBasePath' => dirname( __FILE__ ), |
27 | 27 | 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps', |
28 | 28 | 'group' => 'ext.maps', |
Index: branches/Maps0.8/includes/services/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -43,7 +43,8 @@ |
44 | 44 | * @since 0.7 |
45 | 45 | */ |
46 | 46 | public function addParameterInfo( array &$params ) { |
47 | | - global $egMapsGoogleMapsType, $egMapsGoogleMapsTypes, $egMapsGoogleAutozoom, $egMapsGMapControls, $egMapsGMapOverlays; |
| 47 | + global $egMapsGoogleMapsType, $egMapsGoogleMapsTypes, $egMapsGoogleAutozoom; |
| 48 | + global $egMapsGMapControls, $egMapsGMapOverlays, $egMapsResizableByDefault; |
48 | 49 | |
49 | 50 | $params['zoom']->addCriteria( new CriterionInRange( 0, 20 ) ); |
50 | 51 | $params['zoom']->setDefault( self::getDefaultZoom() ); |
— | — | @@ -91,6 +92,9 @@ |
92 | 93 | $params['overlays']->setDefault( $egMapsGMapOverlays ); |
93 | 94 | $params['overlays']->addCriteria( new CriterionGoogleOverlay( self::$overlayData ) ); |
94 | 95 | $params['overlays']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); // TODO |
| 96 | + |
| 97 | + $params['resizable'] = new Parameter( 'resizable', Parameter::TYPE_BOOLEAN ); |
| 98 | + $params['resizable']->setDefault( $egMapsResizableByDefault, false ); |
95 | 99 | } |
96 | 100 | |
97 | 101 | /** |
Index: branches/Maps0.8/includes/services/GoogleMaps/jquery.googlemap2.js |
— | — | @@ -119,6 +119,10 @@ |
120 | 120 | map.addOverlay( new GGeoXml( options.kml[i] ) ); |
121 | 121 | } |
122 | 122 | |
| 123 | + if ( options.resizable ) { |
| 124 | + this.resizable() |
| 125 | + } |
| 126 | + |
123 | 127 | function ensureTypeIsSelectable( type, types ) { |
124 | 128 | var typesContainType = false; |
125 | 129 | |
— | — | @@ -182,7 +186,7 @@ |
183 | 187 | } |
184 | 188 | |
185 | 189 | return marker; |
186 | | - } |
| 190 | + } |
187 | 191 | |
188 | 192 | return this; |
189 | 193 | |