Skip to content

Commit 0980b24

Browse files
author
corvis
committed
Added example page for opening in modal
1 parent f383188 commit 0980b24

File tree

4 files changed

+88
-6
lines changed

4 files changed

+88
-6
lines changed

dist/locationpicker.jquery.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jquery-locationpicker - v0.11.0 - 2015-01-04 */
1+
/*! jquery-locationpicker - v0.12.0 - 2015-01-05 */
22
(function($) {
33
function GMapContext(domElement, options) {
44
var _map = new google.maps.Map(domElement, options);
@@ -178,6 +178,12 @@
178178
}
179179
}
180180
}
181+
function autosize(gmapContext) {
182+
google.maps.event.trigger(gmapContext.map, "resize");
183+
setTimeout(function() {
184+
gmapContext.map.setCenter(gmapContext.marker.position);
185+
}, 300);
186+
}
181187
$.fn.locationpicker = function(options, params) {
182188
if (typeof options == "string") {
183189
var _targetDomElement = this.get(0);
@@ -227,6 +233,10 @@
227233
} else {
228234
return null;
229235
}
236+
237+
case "autosize":
238+
autosize(gmapContext);
239+
return this;
230240
}
231241
return null;
232242
}
@@ -257,9 +267,8 @@
257267
});
258268
GmUtility.setPosition(gmapContext, new google.maps.LatLng(settings.location.latitude, settings.location.longitude), function(context) {
259269
updateInputValues(settings.inputBinding, gmapContext);
260-
context.settings.oninitialized($target);
261-
var currentLocation = GmUtility.locationFromLatLng(gmapContext.location);
262270
setupInputListenersInput(settings.inputBinding, gmapContext);
271+
context.settings.oninitialized($target);
263272
});
264273
});
265274
};

dist/locationpicker.jquery.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)