@bmlt-enabled/croutonjs 3.16.3 → 3.17.2
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-core.js +17211 -0
- package/crouton-core.min.js +1 -0
- package/crouton-map.js +2294 -0
- package/crouton-map.min.js +1 -0
- package/crouton.css +6 -1
- package/crouton.js +3290 -2999
- package/crouton.min.css +1 -1
- package/crouton.min.js +1 -1
- package/crouton.nojquery.js +3290 -2999
- package/crouton.nojquery.min.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function CroutonMap(t){var e=this;e.config={google_api_key:null,distance_units:"mi"},Object.assign(e.config,t),e.map=null,e.geocoder=null,e.map_objects=[],e.map_clusters=[],e.oms=null,e.markerClusterer=null,e.handlebarMapOptions=null,e.loadGapi=function(t){var r=document.createElement("script");r.src="https://maps.googleapis.com/maps/api/js?key="+e.config.google_api_key+"&callback="+t,r.defer=!0,r.async=!0;var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)},e.getCurrentLocation=function(t){navigator.geolocation?navigator.geolocation.getCurrentPosition(t,e.errorHandler):$(".geo").removeClass("hide").addClass("show").html("<p>Geolocation is not supported by your browser</p>")},CroutonMap.prototype.addCurrentLocationPin=function(t,r){var i=new google.maps.LatLng(t,r);e.map.setCenter(i);var s=new google.maps.Marker({map:e.map,position:i});e.addToMapObjectCollection(s);var o=new google.maps.InfoWindow;o.setContent("Current Location"),o.open(e.map,s)},e.findMarkerById=function(t){for(var r=0;r<e.map_objects.length;r++){var i=e.map_objects[r];if(parseInt(i.id)===t)return i}return null},e.rowClick=function(t){var r=e.findMarkerById(t);r&&(e.map.setCenter(r.getPosition()),e.map.setZoom(17),google.maps.event.trigger(r,"click"))},e.addToMapObjectCollection=function(t){e.map_objects.push(t)},e.clearAllMapClusters=function(){for(;e.map_clusters.length>0;)e.map_clusters[0].setMap(null),e.map_clusters.splice(0,1);null!==e.oms&&e.oms.removeAllMarkers(),null!==e.markerClusterer&&e.markerClusterer.clearMarkers()},e.clearAllMapObjects=function(){for(;e.map_objects.length>0;)e.map_objects[0].setMap(null),e.map_objects.splice(0,1)}}function MarkerClusterer(t,e,r){this.extend(MarkerClusterer,google.maps.OverlayView),this.map_=t,this.markers_=[],this.clusters_=[],this.sizes=[53,56,66,78,90],this.styles_=[],this.ready_=!1;var i=r||{};this.gridSize_=i.gridSize||60,this.minClusterSize_=i.minimumClusterSize||2,this.maxZoom_=i.maxZoom||null,this.styles_=i.styles||[],this.imagePath_=i.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=i.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,null!=i.zoomOnClick&&(this.zoomOnClick_=i.zoomOnClick),this.averageCenter_=!1,null!=i.averageCenter&&(this.averageCenter_=i.averageCenter),this.setupStyles_(),this.setMap(t),this.prevZoom_=this.map_.getZoom();var s=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var t=s.map_.getZoom(),e=s.map_.minZoom||0,r=Math.min(s.map_.maxZoom||100,s.map_.mapTypes[s.map_.getMapTypeId()].maxZoom);t=Math.min(Math.max(t,e),r),s.prevZoom_!=t&&(s.prevZoom_=t,s.resetViewport())}),google.maps.event.addListener(this.map_,"idle",function(){s.redraw()}),e&&(e.length||Object.keys(e).length)&&this.addMarkers(e,!1)}function Cluster(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinClusterSize(),this.averageCenter_=t.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,t.getStyles(),t.getGridSize())}function ClusterIcon(t,e,r){t.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.styles_=e,this.padding_=r||0,this.cluster_=t,this.center_=null,this.map_=t.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}CroutonMap.prototype.mapSearchClickMode=function(){this.mapClickSearchMode=!0,this.map.setOptions({draggableCursor:"crosshair",zoomControl:!1,gestureHandling:"none"})},CroutonMap.prototype.mapSearchPanZoomMode=function(){this.mapClickSearchMode=!1,this.map.setOptions({draggableCursor:"default",zoomControl:!0,gestureHandling:"auto"})},CroutonMap.prototype.mapSearchNearMeMode=function(){this.mapSearchPanZoomMode(),this.getCurrentLocation(function(t){crouton.searchByCoordinates(t.coords.latitude,t.coords.longitude)})},CroutonMap.prototype.mapSearchTextMode=function(t){this.mapSearchPanZoomMode(),null!=t&&""!==t&&this.geocoder.geocode({address:t},function(t,e){"OK"===e?crouton.searchByCoordinates(t[0].geometry.location.lat(),t[0].geometry.location.lng()):console.log("Geocode was not successful for the following reason: "+e)})},CroutonMap.prototype.renderMap=function(){var t=this;t.geocoder=new google.maps.Geocoder,jQuery.when(jQuery.getJSON(t.config.template_path+"/themes/"+t.config.theme+".json").then(function(e,r,i){return t.config.theme_js=e.google_map_theme})).then(function(){t.map=new google.maps.Map(document.getElementById(t.domElementName),{zoom:t.config.map_search.zoom||10,center:{lat:t.config.map_search.latitude,lng:t.config.map_search.longitude},mapTypeControl:!1,styles:t.config.theme_js});var e=document.createElement("div"),r=document.createElement("div");r.className="mapcontrolcontainer",r.title="Click to recenter the map",e.appendChild(r);var i=document.createElement("div");i.className="mapcontrols",i.innerHTML='<label for="nearme" class="mapcontrolslabel"><input type="radio" id="nearme" name="mapcontrols"> '+crouton.localization.getWord("near_me")+'</label><label for="textsearch" class="mapcontrolslabel"><input type="radio" id="textsearch" name="mapcontrols"> '+crouton.localization.getWord("text_search")+'</label><label for="clicksearch" class="mapcontrolslabel"><input type="radio" id="clicksearch" name="mapcontrols"> '+crouton.localization.getWord("click_search")+"</label>",r.appendChild(i),e.index=1,google.maps.event.addDomListener(i,"click",function(){var e=jQuery("input:radio[name='mapcontrols']:checked").attr("id");"textsearch"===e?t.mapSearchTextMode(prompt("Enter a location or postal code:")):"nearme"===e?t.mapSearchNearMeMode():"clicksearch"===e&&t.mapSearchClickMode()}),t.map.controls[google.maps.ControlPosition.TOP_LEFT].push(e),t.map.addListener("click",function(e){t.mapClickSearchMode&&(t.mapSearchPanZoomMode(),crouton.searchByCoordinates(e.latLng.lat(),e.latLng.lng()))}),t.config.map_search.auto?t.mapSearchNearMeMode():void 0!==t.config.map_search.location?t.mapSearchTextMode(t.config.map_search.location):t.config.map_search.coordinates_search&&crouton.searchByCoordinates(t.config.map_search.latitude,t.config.map_search.longitude)})},CroutonMap.prototype.showMap=function(){},CroutonMap.prototype.render=function(t){self=this,self.domElementName=t,this.loadGapi("croutonMap.renderMap")},CroutonMap.prototype.reload=function(t,e){this.meetingData=t,this.formatsData=e},CroutonMap.prototype.initialize=function(t,e,r,i=null){this.meetingData=e,this.formatsData=r,this.handlebarMapOptions=i,this.domElementName=t,this.loadGapi("croutonMap.initMap")},CroutonMap.prototype.initMap=function(t=null){if(null==this.map){var e={zoom:3,maxZoom:17};this.handlebarMapOptions&&(e={center:new google.maps.LatLng(this.handlebarMapOptions.lat,this.handlebarMapOptions.lng),zoom:this.handlebarMapOptions.zoom,mapTypeId:google.maps.MapTypeId.ROADMAP}),this.map=new google.maps.Map(document.getElementById(this.domElementName),e)}this.fillMap(),t&&t()},CroutonMap.prototype.fillMap=function(t=null){var e=this;if(null==e.map)return;e.clearAllMapObjects(),e.clearAllMapClusters();const r=e.meetingData.filter(t=>t.venue_type!=venueType.VIRTUAL),i=null===t?r:r.filter(e=>t.includes(e.id_bigint)),s=i.reduce(function(t,e){return t.extend(new google.maps.LatLng(e.latitude,e.longitude))},new google.maps.LatLngBounds);e.handlebarMapOptions||e.map.fitBounds(s),e.map.getZoom()>18&&e.map.setZoom(18);var o=new google.maps.InfoWindow;e.oms=new OverlappingMarkerSpiderfier(e.map,{markersWontMove:!0,markersWontHide:!0}),e.oms.addListener("format",function(t,r){var i;i=r===OverlappingMarkerSpiderfier.markerStatus.SPIDERFIED||r===OverlappingMarkerSpiderfier.markerStatus.SPIDERFIABLE||r===OverlappingMarkerSpiderfier.markerStatus.UNSPIDERFIED?e.config.template_path+"/NAMarkerR.png":r===OverlappingMarkerSpiderfier.markerStatus.UNSPIDERFIABLE?e.config.template_path+"/NAMarkerB.png":null;var s=new google.maps.Size(22,32);t.setIcon({url:i,size:s,scaledSize:s})}),e.map.addListener("zoom_changed",function(){e.map.addListener("idle",function(){for(var t=e.oms.markersNearAnyOtherMarker(),r=0;r<t.length;r++)t[r].icon.url=e.config.template_path+"/NAMarkerR.png"})}),e.oms.addListener("click",function(t){t.zIndex=999,o.setContent(t.desc),o.open(e.map,t)}),o.addListener("closeclick",function(){jQuery(".bmlt-data-row > td").removeClass("rowHighlight")}),i.map(function(t,r){var i="<dl><dt><strong>";i+=t.meeting_name,i+="</strong></dt>",i+="<dd><em>",i+=crouton.localization.getDayOfTheWeekWord(t.weekday_tinyint);var s=t.start_time.toString().split(":"),n=parseInt(s[0]),a=parseInt(s[1]),l="AM";n>=12&&(l="PM",n>12&&(n-=12)),n=n.toString(),a=a>9?a.toString():"0"+a.toString(),i+=" "+n+":"+a+" "+l,i+="</em><br>",i+=t.location_text,i+="<br>",void 0!==t.location_street&&(i+=t.location_street+"<br>"),void 0!==t.location_municipality&&(i+=t.location_municipality+" "),void 0!==t.location_province&&(i+=t.location_province+" "),void 0!==t.location_postal_code_1&&(i+=t.location_postal_code_1),i+="<br>";var h="https://maps.google.com/maps?q="+t.latitude+","+t.longitude+"&hl="+e.config.short_language;i+='<a target="_blank" href="'+h+'">',i+=crouton.localization.getWord("map"),i+="</a>",i+="</dd></dl>";var u={lat:parseFloat(t.latitude),lng:parseFloat(t.longitude)},p=new google.maps.Marker({position:u});return p.id=t.id_bigint,p.day_id=t.weekday_tinyint,e.addToMapObjectCollection(p),e.oms.addMarker(p),e.map_clusters.push(p),google.maps.event.addListener(p,"click",function(t){jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+p.id+" > td").addClass("rowHighlight"),crouton.dayTab(p.day_id),o.setContent(i),o.open(e.map,p)}),p}),e.markerClusterer=new MarkerClusterer(e.map,e.map_clusters,{imagePath:e.config.template_path+"/m",maxZoom:e.config.map_max_zoom,zoomOnClick:!1})},MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_="../images/m",MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_="png",MarkerClusterer.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},MarkerClusterer.prototype.onAdd=function(){this.setReady_(!0)},MarkerClusterer.prototype.draw=function(){},MarkerClusterer.prototype.setupStyles_=function(){if(!this.styles_.length)for(var t,e=0;t=this.sizes[e];e++)this.styles_.push({url:this.imagePath_+(e+1)+"."+this.imageExtension_,height:t,width:t})},MarkerClusterer.prototype.fitMapToMarkers=function(){for(var t,e=this.getMarkers(),r=new google.maps.LatLngBounds,i=0;t=e[i];i++)r.extend(t.getPosition());this.map_.fitBounds(r)},MarkerClusterer.prototype.setStyles=function(t){this.styles_=t},MarkerClusterer.prototype.getStyles=function(){return this.styles_},MarkerClusterer.prototype.isZoomOnClick=function(){return this.zoomOnClick_},MarkerClusterer.prototype.isAverageCenter=function(){return this.averageCenter_},MarkerClusterer.prototype.getMarkers=function(){return this.markers_},MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length},MarkerClusterer.prototype.setMaxZoom=function(t){this.maxZoom_=t},MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_},MarkerClusterer.prototype.calculator_=function(t,e){for(var r=0,i=t.length,s=i;0!==s;)s=parseInt(s/10,10),r++;return{text:i,index:r=Math.min(r,e)}},MarkerClusterer.prototype.setCalculator=function(t){this.calculator_=t},MarkerClusterer.prototype.getCalculator=function(){return this.calculator_},MarkerClusterer.prototype.addMarkers=function(t,e){if(t.length)for(var r=0;i=t[r];r++)this.pushMarkerTo_(i);else if(Object.keys(t).length)for(var i in t)this.pushMarkerTo_(t[i]);e||this.redraw()},MarkerClusterer.prototype.pushMarkerTo_=function(t){if(t.isAdded=!1,t.draggable){var e=this;google.maps.event.addListener(t,"dragend",function(){t.isAdded=!1,e.repaint()})}this.markers_.push(t)},MarkerClusterer.prototype.addMarker=function(t,e){this.pushMarkerTo_(t),e||this.redraw()},MarkerClusterer.prototype.removeMarker_=function(t){var e=-1;if(this.markers_.indexOf)e=this.markers_.indexOf(t);else for(var r,i=0;r=this.markers_[i];i++)if(r==t){e=i;break}return-1!=e&&(t.setMap(null),this.markers_.splice(e,1),!0)},MarkerClusterer.prototype.removeMarker=function(t,e){var r=this.removeMarker_(t);return!(e||!r)&&(this.resetViewport(),this.redraw(),!0)},MarkerClusterer.prototype.removeMarkers=function(t,e){for(var r,i=!1,s=0;r=t[s];s++){var o=this.removeMarker_(r);i=i||o}if(!e&&i)return this.resetViewport(),this.redraw(),!0},MarkerClusterer.prototype.setReady_=function(t){this.ready_||(this.ready_=t,this.createClusters_())},MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length},MarkerClusterer.prototype.getMap=function(){return this.map_},MarkerClusterer.prototype.setMap=function(t){this.map_=t},MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_},MarkerClusterer.prototype.setGridSize=function(t){this.gridSize_=t},MarkerClusterer.prototype.getMinClusterSize=function(){return this.minClusterSize_},MarkerClusterer.prototype.setMinClusterSize=function(t){this.minClusterSize_=t},MarkerClusterer.prototype.getExtendedBounds=function(t){var e=this.getProjection(),r=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),i=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),s=e.fromLatLngToDivPixel(r);s.x+=this.gridSize_,s.y-=this.gridSize_;var o=e.fromLatLngToDivPixel(i);o.x-=this.gridSize_,o.y+=this.gridSize_;var n=e.fromDivPixelToLatLng(s),a=e.fromDivPixelToLatLng(o);return t.extend(n),t.extend(a),t},MarkerClusterer.prototype.isMarkerInBounds_=function(t,e){return e.contains(t.getPosition())},MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers_=[]},MarkerClusterer.prototype.resetViewport=function(t){for(var e,r=0;e=this.clusters_[r];r++)e.remove();var i;for(r=0;i=this.markers_[r];r++)i.isAdded=!1,t&&i.setMap(null);this.clusters_=[]},MarkerClusterer.prototype.repaint=function(){var t=this.clusters_.slice();this.clusters_.length=0,this.resetViewport(),this.redraw(),window.setTimeout(function(){for(var e,r=0;e=t[r];r++)e.remove()},0)},MarkerClusterer.prototype.redraw=function(){this.createClusters_()},MarkerClusterer.prototype.distanceBetweenPoints_=function(t,e){if(!t||!e)return 0;var r=(e.lat()-t.lat())*Math.PI/180,i=(e.lng()-t.lng())*Math.PI/180,s=Math.sin(r/2)*Math.sin(r/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},MarkerClusterer.prototype.addToClosestCluster_=function(t){for(var e,r=4e4,i=null,s=(t.getPosition(),0);e=this.clusters_[s];s++){var o=e.getCenter();if(o){var n=this.distanceBetweenPoints_(o,t.getPosition());n<r&&(r=n,i=e)}}i&&i.isMarkerInClusterBounds(t)?i.addMarker(t):((e=new Cluster(this)).addMarker(t),this.clusters_.push(e))},MarkerClusterer.prototype.createClusters_=function(){if(this.ready_)for(var t,e=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),r=this.getExtendedBounds(e),i=0;t=this.markers_[i];i++)!t.isAdded&&this.isMarkerInBounds_(t,r)&&this.addToClosestCluster_(t)},Cluster.prototype.isMarkerAlreadyAdded=function(t){if(this.markers_.indexOf)return-1!=this.markers_.indexOf(t);for(var e,r=0;e=this.markers_[r];r++)if(e==t)return!0;return!1},Cluster.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,r=(this.center_.lat()*(e-1)+t.getPosition().lat())/e,i=(this.center_.lng()*(e-1)+t.getPosition().lng())/e;this.center_=new google.maps.LatLng(r,i),this.calculateBounds_()}}else this.center_=t.getPosition(),this.calculateBounds_();t.isAdded=!0,this.markers_.push(t);var s=this.markers_.length;if(s<this.minClusterSize_&&t.getMap()!=this.map_&&t.setMap(this.map_),s==this.minClusterSize_)for(var o=0;o<s;o++)this.markers_[o].setMap(null);return s>=this.minClusterSize_&&t.setMap(null),this.updateIcon(),!0},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){for(var t,e=new google.maps.LatLngBounds(this.center_,this.center_),r=this.getMarkers(),i=0;t=r[i];i++)e.extend(t.getPosition());return e},Cluster.prototype.remove=function(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.calculateBounds_=function(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)},Cluster.prototype.isMarkerInClusterBounds=function(t){return this.bounds_.contains(t.getPosition())},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.updateIcon=function(){var t=this.map_.getZoom(),e=this.markerClusterer_.getMaxZoom();if(e&&t>e)for(var r,i=0;r=this.markers_[i];i++)r.setMap(this.map_);else if(this.markers_.length<this.minClusterSize_)this.clusterIcon_.hide();else{var s=this.markerClusterer_.getStyles().length,o=this.markerClusterer_.getCalculator()(this.markers_,s);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.setSums(o),this.clusterIcon_.show()}},ClusterIcon.prototype.triggerClusterClick=function(){var t=this.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"clusterclick",this.cluster_),t.isZoomOnClick()&&this.map_.fitBounds(this.cluster_.getBounds())},ClusterIcon.prototype.onAdd=function(){if(this.div_=document.createElement("DIV"),this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.innerHTML=this.sums_.text}this.getPanes().overlayMouseTarget.appendChild(this.div_);var e=this;google.maps.event.addDomListener(this.div_,"click",function(){e.triggerClusterClick()})},ClusterIcon.prototype.getPosFromLatLng_=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=parseInt(this.width_/2,10),e.y-=parseInt(this.height_/2,10),e},ClusterIcon.prototype.draw=function(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},ClusterIcon.prototype.show=function(){if(this.div_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.style.display=""}this.visible_=!0},ClusterIcon.prototype.remove=function(){this.setMap(null)},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.setSums=function(t){this.sums_=t,this.text_=t.text,this.index_=t.index,this.div_&&(this.div_.innerHTML=t.text),this.useStyle()},ClusterIcon.prototype.useStyle=function(){var t=Math.max(0,this.sums_.index-1);t=Math.min(this.styles_.length-1,t);var e=this.styles_[t];this.url_=e.url,this.height_=e.height,this.width_=e.width,this.textColor_=e.textColor,this.anchor_=e.anchor,this.textSize_=e.textSize,this.backgroundPosition_=e.backgroundPosition},ClusterIcon.prototype.setCenter=function(t){this.center_=t},ClusterIcon.prototype.createCss=function(t){var e=[];e.push("background-image:url("+this.url_+");");var r=this.backgroundPosition_?this.backgroundPosition_:"0 0";e.push("background-position:"+r+";"),"object"==typeof this.anchor_?("number"==typeof this.anchor_[0]&&this.anchor_[0]>0&&this.anchor_[0]<this.height_?e.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),"number"==typeof this.anchor_[1]&&this.anchor_[1]>0&&this.anchor_[1]<this.width_?e.push("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):e.push("width:"+this.width_+"px; text-align:center;")):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;");var i=this.textColor_?this.textColor_:"black",s=this.textSize_?this.textSize_:11;return e.push("cursor:pointer; top:"+t.y+"px; left:"+t.x+"px; color:"+i+"; position:absolute; font-size:"+s+"px; font-family:Arial,sans-serif; font-weight:bold"),e.join("")},function(){var t,e,r,i,s,o,n={}.hasOwnProperty,a=[].slice;this.OverlappingMarkerSpiderfier=function(){var t,e,r,i,s,o,l,h;for(r=0,i=(l=[u,o=u.prototype]).length;r<i;r++)l[r].VERSION="1.0.3";function u(r,i){var a,l,u,p,c;for(a in this.map=r,null==i&&(i={}),null==this.constructor.hasInitialized&&(this.constructor.hasInitialized=!0,e=google.maps,t=e.event,s=e.MapTypeId,o.keepSpiderfied=!1,o.ignoreMapClick=!1,o.markersWontHide=!1,o.markersWontMove=!1,o.basicFormatEvents=!1,o.nearbyDistance=20,o.circleSpiralSwitchover=9,o.circleFootSeparation=23,o.circleStartAngle=h/12,o.spiralFootSeparation=26,o.spiralLengthStart=11,o.spiralLengthFactor=4,o.spiderfiedZIndex=e.Marker.MAX_ZINDEX+2e4,o.highlightedLegZIndex=e.Marker.MAX_ZINDEX+1e4,o.usualLegZIndex=e.Marker.MAX_ZINDEX+1,o.legWeight=1.5,o.legColors={usual:{},highlighted:{}},u=o.legColors.usual,l=o.legColors.highlighted,u[s.HYBRID]=u[s.SATELLITE]="#fff",l[s.HYBRID]=l[s.SATELLITE]="#f00",u[s.TERRAIN]=u[s.ROADMAP]="#444",l[s.TERRAIN]=l[s.ROADMAP]="#f00",this.constructor.ProjHelper=function(t){return this.setMap(t)},this.constructor.ProjHelper.prototype=new e.OverlayView,this.constructor.ProjHelper.prototype.draw=function(){}),i)n.call(i,a)&&(p=i[a],this[a]=p);this.projHelper=new this.constructor.ProjHelper(this.map),this.initMarkerArrays(),this.listeners={},this.formatIdleListener=this.formatTimeoutId=null,this.addListener("click",function(e,r){return t.trigger(e,"spider_click",r)}),this.addListener("format",function(e,r){return t.trigger(e,"spider_format",r)}),this.ignoreMapClick||t.addListener(this.map,"click",(c=this,function(){return c.unspiderfy()})),t.addListener(this.map,"maptypeid_changed",function(t){return function(){return t.unspiderfy()}}(this)),t.addListener(this.map,"zoom_changed",function(t){return function(){if(t.unspiderfy(),!t.basicFormatEvents)return t.formatMarkers()}}(this))}return h=2*Math.PI,e=t=s=null,u.markerStatus={SPIDERFIED:"SPIDERFIED",SPIDERFIABLE:"SPIDERFIABLE",UNSPIDERFIABLE:"UNSPIDERFIABLE",UNSPIDERFIED:"UNSPIDERFIED"},o.initMarkerArrays=function(){return this.markers=[],this.markerListenerRefs=[]},o.addMarker=function(t,e){return t.setMap(this.map),this.trackMarker(t,e)},o.trackMarker=function(e,r){var i,s;return null!=e._oms?this:(e._oms=!0,i=[t.addListener(e,"click",(s=this,function(t){return s.spiderListener(e,t)}))],this.markersWontHide||i.push(t.addListener(e,"visible_changed",function(t){return function(){return t.markerChangeListener(e,!1)}}(this))),this.markersWontMove||i.push(t.addListener(e,"position_changed",function(t){return function(){return t.markerChangeListener(e,!0)}}(this))),null!=r&&i.push(t.addListener(e,"spider_click",r)),this.markerListenerRefs.push(i),this.markers.push(e),this.basicFormatEvents?this.trigger("format",e,this.constructor.markerStatus.UNSPIDERFIED):(this.trigger("format",e,this.constructor.markerStatus.UNSPIDERFIABLE),this.formatMarkers()),this)},o.markerChangeListener=function(t,e){if(!this.spiderfying&&!this.unspiderfying)return null==t._omsData||!e&&t.getVisible()||this.unspiderfy(e?t:null),this.formatMarkers()},o.getMarkers=function(){return this.markers.slice(0)},o.removeMarker=function(t){return this.forgetMarker(t),t.setMap(null)},o.forgetMarker=function(e){var r,i,s,o,n;if(null!=e._omsData&&this.unspiderfy(),(r=this.arrIndexOf(this.markers,e))<0)return this;for(i=0,s=(n=this.markerListenerRefs.splice(r,1)[0]).length;i<s;i++)o=n[i],t.removeListener(o);return delete e._oms,this.markers.splice(r,1),this.formatMarkers(),this},o.removeAllMarkers=o.clearMarkers=function(){var t,e,r;for(r=this.getMarkers(),this.forgetAllMarkers(),t=0,e=r.length;t<e;t++)r[t].setMap(null);return this},o.forgetAllMarkers=function(){var e,r,i,s,o,n,a,l,h;for(this.unspiderfy(),e=r=0,i=(h=this.markers).length;r<i;e=++r){for(a=h[e],l=0,s=(n=this.markerListenerRefs[e]).length;l<s;l++)o=n[l],t.removeListener(o);delete a._oms}return this.initMarkerArrays(),this},o.addListener=function(t,e){var r;return(null!=(r=this.listeners)[t]?r[t]:r[t]=[]).push(e),this},o.removeListener=function(t,e){var r;return(r=this.arrIndexOf(this.listeners[t],e))<0||this.listeners[t].splice(r,1),this},o.clearListeners=function(t){return this.listeners[t]=[],this},o.trigger=function(){var t,e,r,i,s,o,n,l;for(e=arguments[0],t=2<=arguments.length?a.call(arguments,1):[],l=[],i=0,s=(n=null!=(o=this.listeners[e])?o:[]).length;i<s;i++)r=n[i],l.push(r.apply(null,t));return l},o.generatePtsCircle=function(t,r){var i,s,o,n,a,l,u;for(a=this.circleFootSeparation*(2+t)/h,s=h/t,u=[],o=n=0,l=t;0<=l?n<l:n>l;o=0<=l?++n:--n)i=this.circleStartAngle+o*s,u.push(new e.Point(r.x+a*Math.cos(i),r.y+a*Math.sin(i)));return u},o.generatePtsSpiral=function(t,r){var i,s,o,n,a,l,u;for(n=this.spiralLengthStart,i=0,u=[],s=o=0,l=t;0<=l?o<l:o>l;s=0<=l?++o:--o)i+=this.spiralFootSeparation/n+5e-4*s,a=new e.Point(r.x+n*Math.cos(i),r.y+n*Math.sin(i)),n+=h*this.spiralLengthFactor/i,u.push(a);return u},o.spiderListener=function(t,e){var r,i,s,o,n,a,l,h,u,p,c;if((a=null!=t._omsData)&&this.keepSpiderfied||this.unspiderfy(),a||this.map.getStreetView().getVisible()||"GoogleEarthAPI"===this.map.getMapTypeId())return this.trigger("click",t,e);for(h=[],u=[],p=(l=this.nearbyDistance)*l,n=this.llToPt(t.position),r=0,i=(c=this.markers).length;r<i;r++)null!=(s=c[r]).map&&s.getVisible()&&(o=this.llToPt(s.position),this.ptDistanceSq(o,n)<p?h.push({marker:s,markerPt:o}):u.push(s));return 1===h.length?this.trigger("click",t,e):this.spiderfy(h,u)},o.markersNearMarker=function(t,e){var r,i,s,o,n,a,l,h,u,p,c;if(null==e&&(e=!1),null==this.projHelper.getProjection())throw"Must wait for 'idle' event on map before calling markersNearMarker";for(h=(l=this.nearbyDistance)*l,n=this.llToPt(t.position),a=[],r=0,i=(u=this.markers).length;r<i&&!((s=u[r])!==t&&null!=s.map&&s.getVisible()&&(o=this.llToPt(null!=(p=null!=(c=s._omsData)?c.usualPosition:void 0)?p:s.position),this.ptDistanceSq(o,n)<h&&(a.push(s),e)));r++);return a},o.markerProximityData=function(){var t,e,r,i,s,o,n,a,l,h,u,p,c,m,d,g;if(null==this.projHelper.getProjection())throw"Must wait for 'idle' event on map before calling markersNearAnyOtherMarker";for(m=(c=this.nearbyDistance)*c,u=function(){var t,e,r,i,s,n;for(n=[],t=0,e=(r=this.markers).length;t<e;t++)o=r[t],n.push({pt:this.llToPt(null!=(i=null!=(s=o._omsData)?s.usualPosition:void 0)?i:o.position),willSpiderfy:!1});return n}.call(this),t=r=0,i=(d=this.markers).length;r<i;t=++r)if(null!=(n=d[t]).getMap()&&n.getVisible()&&!(a=u[t]).willSpiderfy)for(e=p=0,s=(g=this.markers).length;p<s;e=++p)if(l=g[e],e!==t&&null!=l.getMap()&&l.getVisible()&&(h=u[e],(!(e<t)||h.willSpiderfy)&&this.ptDistanceSq(a.pt,h.pt)<m)){a.willSpiderfy=h.willSpiderfy=!0;break}return u},o.markersNearAnyOtherMarker=function(){var t,e,r,i,s,o,n;for(s=this.markerProximityData(),n=[],t=e=0,r=(o=this.markers).length;e<r;t=++e)i=o[t],s[t].willSpiderfy&&n.push(i);return n},o.setImmediate=function(t){return window.setTimeout(t,0)},o.formatMarkers=function(){var e;if(!this.basicFormatEvents&&null==this.formatTimeoutId)return this.formatTimeoutId=this.setImmediate((e=this,function(){return e.formatTimeoutId=null,null!=e.projHelper.getProjection()?e._formatMarkers():null==e.formatIdleListener?e.formatIdleListener=t.addListenerOnce(e.map,"idle",function(){return e._formatMarkers()}):void 0}))},o._formatMarkers=function(){var t,e,r,i,s,o,n,a,l,h,u;if(this.basicFormatEvents){for(l=[],e=0,r=markers.length;e<r;e++)u=null!=(s=markers[e])._omsData?"SPIDERFIED":"UNSPIDERFIED",l.push(this.trigger("format",s,this.constructor.markerStatus[u]));return l}for(n=this.markerProximityData(),h=[],t=o=0,i=(a=this.markers).length;o<i;t=++o)u=null!=(s=a[t])._omsData?"SPIDERFIED":n[t].willSpiderfy?"SPIDERFIABLE":"UNSPIDERFIABLE",h.push(this.trigger("format",s,this.constructor.markerStatus[u]));return h},o.makeHighlightListenerFuncs=function(t){return{highlight:(e=this,function(){return t._omsData.leg.setOptions({strokeColor:e.legColors.highlighted[e.map.mapTypeId],zIndex:e.highlightedLegZIndex})}),unhighlight:function(e){return function(){return t._omsData.leg.setOptions({strokeColor:e.legColors.usual[e.map.mapTypeId],zIndex:e.usualLegZIndex})}}(this)};var e},o.spiderfy=function(r,i){var s,o,n,a,l,h,u,p,c,m,d;return this.spiderfying=!0,m=r.length,s=this.ptAverage(function(){var t,e,i;for(i=[],t=0,e=r.length;t<e;t++)p=r[t],i.push(p.markerPt);return i}()),a=m>=this.circleSpiralSwitchover?this.generatePtsSpiral(m,s).reverse():this.generatePtsCircle(m,s),d=function(){var i,s,p;for(p=[],i=0,s=a.length;i<s;i++)n=a[i],o=this.ptToLl(n),c=this.minExtract(r,function(t){return function(e){return t.ptDistanceSq(e.markerPt,n)}}(this)),u=c.marker,h=new e.Polyline({map:this.map,path:[u.position,o],strokeColor:this.legColors.usual[this.map.mapTypeId],strokeWeight:this.legWeight,zIndex:this.usualLegZIndex}),u._omsData={usualPosition:u.getPosition(),usualZIndex:u.getZIndex(),leg:h},this.legColors.highlighted[this.map.mapTypeId]!==this.legColors.usual[this.map.mapTypeId]&&(l=this.makeHighlightListenerFuncs(u),u._omsData.hightlightListeners={highlight:t.addListener(u,"mouseover",l.highlight),unhighlight:t.addListener(u,"mouseout",l.unhighlight)}),this.trigger("format",u,this.constructor.markerStatus.SPIDERFIED),u.setPosition(o),u.setZIndex(Math.round(this.spiderfiedZIndex+n.y)),p.push(u);return p}.call(this),delete this.spiderfying,this.spiderfied=!0,this.trigger("spiderfy",d,i)},o.unspiderfy=function(e){var r,i,s,o,n,a,l,h;if(null==e&&(e=null),null==this.spiderfied)return this;for(this.unspiderfying=!0,h=[],n=[],r=0,i=(a=this.markers).length;r<i;r++)null!=(o=a[r])._omsData?(o._omsData.leg.setMap(null),o!==e&&o.setPosition(o._omsData.usualPosition),o.setZIndex(o._omsData.usualZIndex),null!=(s=o._omsData.hightlightListeners)&&(t.removeListener(s.highlight),t.removeListener(s.unhighlight)),delete o._omsData,o!==e&&(l=this.basicFormatEvents?"UNSPIDERFIED":"SPIDERFIABLE",this.trigger("format",o,this.constructor.markerStatus[l])),h.push(o)):n.push(o);return delete this.unspiderfying,delete this.spiderfied,this.trigger("unspiderfy",h,n),this},o.ptDistanceSq=function(t,e){var r,i;return(r=t.x-e.x)*r+(i=t.y-e.y)*i},o.ptAverage=function(t){var r,i,s,o,n,a;for(n=a=0,r=0,i=t.length;r<i;r++)n+=(o=t[r]).x,a+=o.y;return s=t.length,new e.Point(n/s,a/s)},o.llToPt=function(t){return this.projHelper.getProjection().fromLatLngToDivPixel(t)},o.ptToLl=function(t){return this.projHelper.getProjection().fromDivPixelToLatLng(t)},o.minExtract=function(t,e){var r,i,s,o,n,a;for(s=o=0,n=t.length;o<n;s=++o)a=e(t[s]),(null==r||a<i)&&(i=a,r=s);return t.splice(r,1)[0]},o.arrIndexOf=function(t,e){var r,i,s;if(null!=t.indexOf)return t.indexOf(e);for(r=i=0,s=t.length;i<s;r=++i)if(t[r]===e)return r;return-1},u}(),e=/(\?.*(&|&)|\?)spiderfier_callback=(\w+)/,null==(s=document.currentScript)&&(s=function(){var t,r,i,s,n;for(n=[],t=0,r=(i=document.getElementsByTagName("script")).length;t<r;t++)(null!=(s=(o=i[t]).getAttribute("src"))?s.match(e):void 0)&&n.push(o);return n}()[0]),null!=s&&(t=null!=(r=s.getAttribute("src"))&&null!=(i=r.match(e))?i[3]:void 0)&&"function"==typeof window[t]&&window[t](),"function"==typeof window.spiderfier_callback&&window.spiderfier_callback()}.call(this);
|
package/crouton.css
CHANGED
|
@@ -479,7 +479,9 @@ table.tablesaw {
|
|
|
479
479
|
.bmlt-map {
|
|
480
480
|
height: 400px;
|
|
481
481
|
}
|
|
482
|
-
|
|
482
|
+
#byfield_embeddedMapPage{
|
|
483
|
+
height: 400px;
|
|
484
|
+
}
|
|
483
485
|
.bmlt-observer {
|
|
484
486
|
font-size: 14px;
|
|
485
487
|
font-weight: bold;
|
|
@@ -556,6 +558,9 @@ table.tablesaw {
|
|
|
556
558
|
.tablesaw-stack td:empty,.tablesaw-stack th:empty {
|
|
557
559
|
display: none;
|
|
558
560
|
}
|
|
561
|
+
th#meeting-details-title {
|
|
562
|
+
display: table-cell;
|
|
563
|
+
}
|
|
559
564
|
}
|
|
560
565
|
|
|
561
566
|
/* Media query to show as a standard table at 560px (35em x 16px) or wider */
|