/
var
/
www
/
barefootlaw.org
/
wp-content
/
plugins
/
vc-shortcodes
/
shortcodes
/
timeline
/
js
/
Upload File
HOME
function RichMarker(e){var t=e||{};this.ready_=false;this.dragging_=false;if(e["visible"]==undefined){e["visible"]=true}if(e["shadow"]==undefined){e["shadow"]="7px -3px 5px rgba(88,88,88,0.7)"}if(e["anchor"]==undefined){e["anchor"]=RichMarkerPosition["BOTTOM"]}this.setValues(t)}RichMarker.prototype=new google.maps.OverlayView;window["RichMarker"]=RichMarker;RichMarker.prototype.getVisible=function(){return this.get("visible")};RichMarker.prototype["getVisible"]=RichMarker.prototype.getVisible;RichMarker.prototype.setVisible=function(e){this.set("visible",e)};RichMarker.prototype["setVisible"]=RichMarker.prototype.setVisible;RichMarker.prototype.visible_changed=function(){if(this.ready_){this.markerWrapper_.style["display"]=this.getVisible()?"":"none";this.draw()}};RichMarker.prototype["visible_changed"]=RichMarker.prototype.visible_changed;RichMarker.prototype.setFlat=function(e){this.set("flat",!!e)};RichMarker.prototype["setFlat"]=RichMarker.prototype.setFlat;RichMarker.prototype.getFlat=function(){return this.get("flat")};RichMarker.prototype["getFlat"]=RichMarker.prototype.getFlat;RichMarker.prototype.getWidth=function(){return this.get("width")};RichMarker.prototype["getWidth"]=RichMarker.prototype.getWidth;RichMarker.prototype.getHeight=function(){return this.get("height")};RichMarker.prototype["getHeight"]=RichMarker.prototype.getHeight;RichMarker.prototype.setShadow=function(e){this.set("shadow",e);this.flat_changed()};RichMarker.prototype["setShadow"]=RichMarker.prototype.setShadow;RichMarker.prototype.getShadow=function(){return this.get("shadow")};RichMarker.prototype["getShadow"]=RichMarker.prototype.getShadow;RichMarker.prototype.flat_changed=function(){if(!this.ready_){return}this.markerWrapper_.style["boxShadow"]=this.markerWrapper_.style["webkitBoxShadow"]=this.markerWrapper_.style["MozBoxShadow"]=this.getFlat()?"":this.getShadow()};RichMarker.prototype["flat_changed"]=RichMarker.prototype.flat_changed;RichMarker.prototype.setZIndex=function(e){this.set("zIndex",e)};RichMarker.prototype["setZIndex"]=RichMarker.prototype.setZIndex;RichMarker.prototype.getZIndex=function(){return this.get("zIndex")};RichMarker.prototype["getZIndex"]=RichMarker.prototype.getZIndex;RichMarker.prototype.zIndex_changed=function(){if(this.getZIndex()&&this.ready_){this.markerWrapper_.style.zIndex=this.getZIndex()}};RichMarker.prototype["zIndex_changed"]=RichMarker.prototype.zIndex_changed;RichMarker.prototype.getDraggable=function(){return this.get("draggable")};RichMarker.prototype["getDraggable"]=RichMarker.prototype.getDraggable;RichMarker.prototype.setDraggable=function(e){this.set("draggable",!!e)};RichMarker.prototype["setDraggable"]=RichMarker.prototype.setDraggable;RichMarker.prototype.draggable_changed=function(){if(this.ready_){if(this.getDraggable()){this.addDragging_(this.markerWrapper_)}else{this.removeDragListeners_()}}};RichMarker.prototype["draggable_changed"]=RichMarker.prototype.draggable_changed;RichMarker.prototype.getPosition=function(){return this.get("position")};RichMarker.prototype["getPosition"]=RichMarker.prototype.getPosition;RichMarker.prototype.setPosition=function(e){this.set("position",e)};RichMarker.prototype["setPosition"]=RichMarker.prototype.setPosition;RichMarker.prototype.position_changed=function(){this.draw()};RichMarker.prototype["position_changed"]=RichMarker.prototype.position_changed;RichMarker.prototype.getAnchor=function(){return this.get("anchor")};RichMarker.prototype["getAnchor"]=RichMarker.prototype.getAnchor;RichMarker.prototype.setAnchor=function(e){this.set("anchor",e)};RichMarker.prototype["setAnchor"]=RichMarker.prototype.setAnchor;RichMarker.prototype.anchor_changed=function(){this.draw()};RichMarker.prototype["anchor_changed"]=RichMarker.prototype.anchor_changed;RichMarker.prototype.htmlToDocumentFragment_=function(e){var t=document.createElement("DIV");t.innerHTML=e;if(t.childNodes.length==1){return t.removeChild(t.firstChild)}else{var n=document.createDocumentFragment();while(t.firstChild){n.appendChild(t.firstChild)}return n}};RichMarker.prototype.removeChildren_=function(e){if(!e){return}var t;while(t=e.firstChild){e.removeChild(t)}};RichMarker.prototype.setContent=function(e){this.set("content",e)};RichMarker.prototype["setContent"]=RichMarker.prototype.setContent;RichMarker.prototype.getContent=function(){return this.get("content")};RichMarker.prototype["getContent"]=RichMarker.prototype.getContent;RichMarker.prototype.content_changed=function(){if(!this.markerContent_){return}this.removeChildren_(this.markerContent_);var e=this.getContent();if(e){if(typeof e=="string"){e=e.replace(/^\s*([\S\s]*)\b\s*$/,"$1");e=this.htmlToDocumentFragment_(e)}this.markerContent_.appendChild(e);var t=this;var n=this.markerContent_.getElementsByTagName("IMG");for(var r=0,i;i=n[r];r++){google.maps.event.addDomListener(i,"mousedown",function(e){if(t.getDraggable()){if(e.preventDefault){e.preventDefault()}e.returnValue=false}});google.maps.event.addDomListener(i,"load",function(){t.draw()})}google.maps.event.trigger(this,"domready")}if(this.ready_){this.draw()}};RichMarker.prototype["content_changed"]=RichMarker.prototype.content_changed;RichMarker.prototype.setCursor_=function(e){if(!this.ready_){return}var t="";if(navigator.userAgent.indexOf("Gecko/")!==-1){if(e=="dragging"){t="-moz-grabbing"}if(e=="dragready"){t="-moz-grab"}if(e=="draggable"){t="pointer"}}else{if(e=="dragging"||e=="dragready"){t="move"}if(e=="draggable"){t="pointer"}}if(this.markerWrapper_.style.cursor!=t){this.markerWrapper_.style.cursor=t}};RichMarker.prototype.startDrag=function(e){if(!this.getDraggable()){return}if(!this.dragging_){this.dragging_=true;var t=this.getMap();this.mapDraggable_=t.get("draggable");t.set("draggable",false);this.mouseX_=e.clientX;this.mouseY_=e.clientY;this.setCursor_("dragready");this.markerWrapper_.style["MozUserSelect"]="none";this.markerWrapper_.style["KhtmlUserSelect"]="none";this.markerWrapper_.style["WebkitUserSelect"]="none";this.markerWrapper_["unselectable"]="on";this.markerWrapper_["onselectstart"]=function(){return false};this.addDraggingListeners_();google.maps.event.trigger(this,"dragstart")}};RichMarker.prototype.stopDrag=function(){if(!this.getDraggable()){return}if(this.dragging_){this.dragging_=false;this.getMap().set("draggable",this.mapDraggable_);this.mouseX_=this.mouseY_=this.mapDraggable_=null;this.markerWrapper_.style["MozUserSelect"]="";this.markerWrapper_.style["KhtmlUserSelect"]="";this.markerWrapper_.style["WebkitUserSelect"]="";this.markerWrapper_["unselectable"]="off";this.markerWrapper_["onselectstart"]=function(){};this.removeDraggingListeners_();this.setCursor_("draggable");google.maps.event.trigger(this,"dragend");this.draw()}};RichMarker.prototype.drag=function(e){if(!this.getDraggable()||!this.dragging_){this.stopDrag();return}var t=this.mouseX_-e.clientX;var n=this.mouseY_-e.clientY;this.mouseX_=e.clientX;this.mouseY_=e.clientY;var r=parseInt(this.markerWrapper_.style["left"],10)-t;var i=parseInt(this.markerWrapper_.style["top"],10)-n;this.markerWrapper_.style["left"]=r+"px";this.markerWrapper_.style["top"]=i+"px";var s=this.getOffset_();var o=new google.maps.Point(r-s.width,i-s.height);var u=this.getProjection();this.setPosition(u.fromDivPixelToLatLng(o));this.setCursor_("dragging");google.maps.event.trigger(this,"drag")};RichMarker.prototype.removeDragListeners_=function(){if(this.draggableListener_){google.maps.event.removeListener(this.draggableListener_);delete this.draggableListener_}this.setCursor_("")};RichMarker.prototype.addDragging_=function(e){if(!e){return}var t=this;this.draggableListener_=google.maps.event.addDomListener(e,"mousedown",function(e){t.startDrag(e)});this.setCursor_("draggable")};RichMarker.prototype.addDraggingListeners_=function(){var e=this;if(this.markerWrapper_.setCapture){this.markerWrapper_.setCapture(true);this.draggingListeners_=[google.maps.event.addDomListener(this.markerWrapper_,"mousemove",function(t){e.drag(t)},true),google.maps.event.addDomListener(this.markerWrapper_,"mouseup",function(){e.stopDrag();e.markerWrapper_.releaseCapture()},true)]}else{this.draggingListeners_=[google.maps.event.addDomListener(window,"mousemove",function(t){e.drag(t)},true),google.maps.event.addDomListener(window,"mouseup",function(){e.stopDrag()},true)]}};RichMarker.prototype.removeDraggingListeners_=function(){if(this.draggingListeners_){for(var e=0,t;t=this.draggingListeners_[e];e++){google.maps.event.removeListener(t)}this.draggingListeners_.length=0}};RichMarker.prototype.getOffset_=function(){var e=this.getAnchor();if(typeof e=="object"){return e}var t=new google.maps.Size(0,0);if(!this.markerContent_){return t}var n=this.markerContent_.offsetWidth;var r=this.markerContent_.offsetHeight;switch(e){case RichMarkerPosition["TOP_LEFT"]:break;case RichMarkerPosition["TOP"]:t.width=-n/2;break;case RichMarkerPosition["TOP_RIGHT"]:t.width=-n;break;case RichMarkerPosition["LEFT"]:t.height=-r/2;break;case RichMarkerPosition["MIDDLE"]:t.width=-n/2;t.height=-r/2;break;case RichMarkerPosition["RIGHT"]:t.width=-n;t.height=-r/2;break;case RichMarkerPosition["BOTTOM_LEFT"]:t.height=-r;break;case RichMarkerPosition["BOTTOM"]:t.width=-n/2;t.height=-r;break;case RichMarkerPosition["BOTTOM_RIGHT"]:t.width=-n;t.height=-r;break}return t};RichMarker.prototype.onAdd=function(){if(!this.markerWrapper_){this.markerWrapper_=document.createElement("DIV");this.markerWrapper_.style["position"]="absolute"}if(this.getZIndex()){this.markerWrapper_.style["zIndex"]=this.getZIndex()}this.markerWrapper_.style["display"]=this.getVisible()?"":"none";if(!this.markerContent_){this.markerContent_=document.createElement("DIV");this.markerWrapper_.appendChild(this.markerContent_);var e=this;google.maps.event.addDomListener(this.markerContent_,"click",function(t){google.maps.event.trigger(e,"click")});google.maps.event.addDomListener(this.markerContent_,"mouseover",function(t){google.maps.event.trigger(e,"mouseover")});google.maps.event.addDomListener(this.markerContent_,"mouseout",function(t){google.maps.event.trigger(e,"mouseout")})}this.ready_=true;this.content_changed();this.flat_changed();this.draggable_changed();var t=this.getPanes();if(t){t.overlayMouseTarget.appendChild(this.markerWrapper_)}google.maps.event.trigger(this,"ready")};RichMarker.prototype["onAdd"]=RichMarker.prototype.onAdd;RichMarker.prototype.draw=function(){if(!this.ready_||this.dragging_){return}var e=this.getProjection();if(!e){return}var t=this.get("position");var n=e.fromLatLngToDivPixel(t);var r=this.getOffset_();this.markerWrapper_.style["top"]=n.y+r.height+"px";this.markerWrapper_.style["left"]=n.x+r.width+"px";var i=this.markerContent_.offsetHeight;var s=this.markerContent_.offsetWidth;if(s!=this.get("width")){this.set("width",s)}if(i!=this.get("height")){this.set("height",i)}};RichMarker.prototype["draw"]=RichMarker.prototype.draw;RichMarker.prototype.onRemove=function(){if(this.markerWrapper_&&this.markerWrapper_.parentNode){this.markerWrapper_.parentNode.removeChild(this.markerWrapper_)}this.removeDragListeners_()};RichMarker.prototype["onRemove"]=RichMarker.prototype.onRemove;var RichMarkerPosition={TOP_LEFT:1,TOP:2,TOP_RIGHT:3,LEFT:4,MIDDLE:5,RIGHT:6,BOTTOM_LEFT:7,BOTTOM:8,BOTTOM_RIGHT:9};window["RichMarkerPosition"]=RichMarkerPosition