@bmlt-enabled/croutonjs 3.16.1 → 3.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/crouton.js CHANGED
@@ -14602,6 +14602,7 @@ function Crouton(config) {
14602
14602
 
14603
14603
  self.rowClick = function(id) {
14604
14604
  var map_marker = self.findMarkerById(id);
14605
+ if (!map_marker) return;
14605
14606
  self.map.setCenter(map_marker.getPosition());
14606
14607
  self.map.setZoom(17);
14607
14608
  google.maps.event.trigger(map_marker, "click");
@@ -15560,7 +15561,7 @@ Crouton.prototype.render = function() {
15560
15561
  dropdownCssClass: 'bmlt-drop'
15561
15562
  });
15562
15563
 
15563
- jQuery('[data-toggle="popover"]').popover();
15564
+ jQuery('[data-toggle="popover"]').popover().click(function(e) {e.preventDefault(); e.stopPropagation()});
15564
15565
  jQuery('html').on('click', function (e) {
15565
15566
  if (jQuery(e.target).data('toggle') !== 'popover') {
15566
15567
  jQuery('[data-toggle="popover"]').popover('hide');
@@ -15736,25 +15737,12 @@ Crouton.prototype.renderMap = function() {
15736
15737
  }
15737
15738
  })
15738
15739
  };
15739
- calculateBounds = function() {
15740
- var bounds = new google.maps.LatLngBounds();
15741
- // We go through all the results, and get the "spread" from them.
15742
- for (var c = 0; c < self.meetingData.length; c++) {
15743
- var lat = self.meetingData[c].latitude;
15744
- var lng = self.meetingData[c].longitude;
15745
- // We will set our minimum and maximum bounds.
15746
- bounds.extend(new google.maps.LatLng(lat, lng));
15747
- }
15748
- // We now have the full rectangle of our meeting search results. Scale the map to fit them.
15749
- self.map.fitBounds(bounds);
15750
-
15751
- }
15752
15740
  Crouton.prototype.initMap = function(callback) {
15753
15741
  var self = this;
15754
15742
  if (self.map == null) {
15755
15743
  jQuery("#bmlt-tabs").before("<div id='bmlt-map' class='bmlt-map'></div>");
15756
15744
  var mapOpt = { zoom: 3 };
15757
- if (self.handlebarMapOptions) mapOpt = {
15745
+ if (self.handlebarMapOptions.length > 0) mapOpt = {
15758
15746
  center: new google.maps.LatLng(self.handlebarMapOptions.lat, self.handlebarMapOptions.lng),
15759
15747
  zoom: self.handlebarMapOptions.zoom,
15760
15748
  mapTypeId:google.maps.MapTypeId.ROADMAP
@@ -15763,7 +15751,17 @@ Crouton.prototype.initMap = function(callback) {
15763
15751
  }
15764
15752
 
15765
15753
  jQuery("#bmlt-map").removeClass("hide");
15766
- if (!self.handlebarMapOptions) self.calculateBounds();
15754
+ var bounds = new google.maps.LatLngBounds();
15755
+ // We go through all the results, and get the "spread" from them.
15756
+ for (var c = 0; c < self.meetingData.length; c++) {
15757
+ if (self.meetingData[c].venue_type == venueType.VIRTUAL) continue;
15758
+ var lat = self.meetingData[c].latitude;
15759
+ var lng = self.meetingData[c].longitude;
15760
+ // We will set our minimum and maximum bounds.
15761
+ bounds.extend(new google.maps.LatLng(lat, lng));
15762
+ }
15763
+ // We now have the full rectangle of our meeting search results. Scale the map to fit them.
15764
+ self.map.fitBounds(bounds);
15767
15765
  var infoWindow = new google.maps.InfoWindow();
15768
15766
 
15769
15767
  // Create OverlappingMarkerSpiderfier instance
@@ -15812,6 +15810,7 @@ Crouton.prototype.initMap = function(callback) {
15812
15810
  // create an array of markers based on a given "locations" array.
15813
15811
  // The map() method here has nothing to do with the Google Maps API.
15814
15812
  self.meetingData.map(function (location, i) {
15813
+ if (location.venue_type == venueType.VIRTUAL) return;
15815
15814
  var marker_html = '<dl><dt><strong>';
15816
15815
  marker_html += location.meeting_name;
15817
15816
  marker_html += '</strong></dt>';