Skip to content
Snippets Groups Projects
Commit 2a8d3c2b authored by Piotr Gawron's avatar Piotr Gawron
Browse files

resize event is passed to google maps properly on jquery dialog resize

parent ef3fe92a
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ var TouchMap = require('./TouchMap');
/**
* Constructor of a submap. Submaps are created on application start. But dialog
* (popup window) is initialized on demand using init function.
*
*
* @param customMap
* parent CustomMap
* @param id
......@@ -38,7 +38,7 @@ Submap.prototype.constructor = Submap;
/**
* This method initializes submap with gui component. Before this point submap
* is created and contains data, but cannot be visualized in the broswer.
*
*
* @param htmlTag
* html div tag where google map should be placed
* @param jsVar
......@@ -73,6 +73,9 @@ Submap.prototype.open = function(htmlTag) {
at : "center",
of : $(self.getTopMap().getElement()),
},
resize: function() {
google.maps.event.trigger(self.getGoogleMap(), 'resize');
}
});
$(self.htmlTag).dialog("open");
......@@ -80,10 +83,6 @@ Submap.prototype.open = function(htmlTag) {
self.setGoogleMap(new google.maps.Map(mapDiv, mapOptions));
self._createMapChangedCallbacks();
$(self.htmlTag).bind("resize", function() {
google.maps.event.trigger(self.getGoogleMap(), 'resize');
});
google.maps.event.trigger(self.getGoogleMap(), 'resize');
if (self.isCustomTouchInterface()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment