diff --git a/build.py b/build.py index 60247f52..dd3ed93a 100755 --- a/build.py +++ b/build.py @@ -117,10 +117,14 @@ outDir = os.path.join('build', buildName) if os.path.exists(outDir): shutil.rmtree(outDir) -# copy the 'dist' folder - this creates the target directory (and any missing parent dirs) -# FIXME? replace with manual copy, and any .css and .js files are parsed for replacement tokens? -shutil.copytree('dist', outDir) - +# copy the 'dist' folder, if it exists +if os.path.exists('dist'): + # this creates the target directory (and any missing parent dirs) + # FIXME? replace with manual copy, and any .css and .js files are parsed for replacement tokens? + shutil.copytree('dist', outDir) +else: + # no 'dist' folder - so create an empty target folder + os.makedirs(outDir) # load main.js, parse, and create main total-conversion-build.user.js diff --git a/dist/autolink.js b/dist/autolink.js deleted file mode 100644 index 013025a7..00000000 --- a/dist/autolink.js +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by CoffeeScript 1.4.0 -(function() { - var autoLink, - __slice = [].slice; - - autoLink = function() { - var callbackThunk, key, link_attributes, option, options, url_pattern, value; - options = 1 <= arguments.length ? __slice.call(arguments, 0) : []; - link_attributes = ''; - option = options[0]; - url_pattern = /(^|\s)(\b(https?|ftp):\/\/[\-A-Z0-9+\u0026@#\/%?=~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~_|])/gi; - if (!(options.length > 0)) { - return this.replace(url_pattern, "$1$2"); - } - if ((option['callback'] != null) && typeof option['callback'] === 'function') { - callbackThunk = option['callback']; - delete option['callback']; - } - for (key in option) { - value = option[key]; - link_attributes += " " + key + "='" + value + "'"; - } - return this.replace(url_pattern, function(match, space, url) { - var link, returnCallback; - returnCallback = callbackThunk && callbackThunk(url); - link = returnCallback || ("" + url + ""); - return "" + space + link; - }); - }; - - String.prototype['autoLink'] = autoLink; - -}).call(this); diff --git a/dist/images/draw-circle.png b/dist/images/draw-circle.png deleted file mode 100644 index 0cb17b8f..00000000 Binary files a/dist/images/draw-circle.png and /dev/null differ diff --git a/dist/images/draw-marker-icon.png b/dist/images/draw-marker-icon.png deleted file mode 100644 index f26437fc..00000000 Binary files a/dist/images/draw-marker-icon.png and /dev/null differ diff --git a/dist/images/draw-polygon.png b/dist/images/draw-polygon.png deleted file mode 100644 index 579102dd..00000000 Binary files a/dist/images/draw-polygon.png and /dev/null differ diff --git a/dist/images/draw-polyline.png b/dist/images/draw-polyline.png deleted file mode 100644 index 18c9a27d..00000000 Binary files a/dist/images/draw-polyline.png and /dev/null differ diff --git a/dist/images/draw-rectangle.png b/dist/images/draw-rectangle.png deleted file mode 100644 index 8f1cbc85..00000000 Binary files a/dist/images/draw-rectangle.png and /dev/null differ diff --git a/dist/images/layers.png b/dist/images/layers.png deleted file mode 100644 index ef90a080..00000000 Binary files a/dist/images/layers.png and /dev/null differ diff --git a/dist/images/marker-blue.png b/dist/images/marker-blue.png deleted file mode 100644 index b73a27da..00000000 Binary files a/dist/images/marker-blue.png and /dev/null differ diff --git a/dist/images/marker-blue@2x.png b/dist/images/marker-blue@2x.png deleted file mode 100644 index 896e8182..00000000 Binary files a/dist/images/marker-blue@2x.png and /dev/null differ diff --git a/dist/images/marker-blue_2x.png b/dist/images/marker-blue_2x.png deleted file mode 100644 index 896e8182..00000000 Binary files a/dist/images/marker-blue_2x.png and /dev/null differ diff --git a/dist/images/marker-green.png b/dist/images/marker-green.png deleted file mode 100644 index 41213743..00000000 Binary files a/dist/images/marker-green.png and /dev/null differ diff --git a/dist/images/marker-green@2x.png b/dist/images/marker-green@2x.png deleted file mode 100644 index 4a019ae2..00000000 Binary files a/dist/images/marker-green@2x.png and /dev/null differ diff --git a/dist/images/marker-green_2x.png b/dist/images/marker-green_2x.png deleted file mode 100644 index 4a019ae2..00000000 Binary files a/dist/images/marker-green_2x.png and /dev/null differ diff --git a/dist/images/marker-icon.png b/dist/images/marker-icon.png deleted file mode 100644 index 920ae496..00000000 Binary files a/dist/images/marker-icon.png and /dev/null differ diff --git a/dist/images/marker-icon@2x.png b/dist/images/marker-icon@2x.png deleted file mode 100644 index b398f511..00000000 Binary files a/dist/images/marker-icon@2x.png and /dev/null differ diff --git a/dist/images/marker-icon_2x.png b/dist/images/marker-icon_2x.png deleted file mode 100644 index b398f511..00000000 Binary files a/dist/images/marker-icon_2x.png and /dev/null differ diff --git a/dist/images/marker-shadow.png b/dist/images/marker-shadow.png deleted file mode 100644 index d1e773c7..00000000 Binary files a/dist/images/marker-shadow.png and /dev/null differ diff --git a/dist/images/pan-down.png b/dist/images/pan-down.png deleted file mode 100644 index b1792e48..00000000 Binary files a/dist/images/pan-down.png and /dev/null differ diff --git a/dist/images/pan-left.png b/dist/images/pan-left.png deleted file mode 100644 index a8e9d938..00000000 Binary files a/dist/images/pan-left.png and /dev/null differ diff --git a/dist/images/pan-right.png b/dist/images/pan-right.png deleted file mode 100644 index a4875633..00000000 Binary files a/dist/images/pan-right.png and /dev/null differ diff --git a/dist/images/pan-up.png b/dist/images/pan-up.png deleted file mode 100644 index 8018524a..00000000 Binary files a/dist/images/pan-up.png and /dev/null differ diff --git a/dist/leaflet.draw.0.1.6.css b/dist/leaflet.draw.0.1.6.css deleted file mode 100644 index c5ad833c..00000000 --- a/dist/leaflet.draw.0.1.6.css +++ /dev/null @@ -1,118 +0,0 @@ -/* Leaflet controls */ - -.leaflet-container .leaflet-control-draw { - margin-left: 13px; - margin-top: 12px; -} - -.leaflet-control-draw a { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; - width: 22px; - height: 22px; -} - -.leaflet-control-draw a:hover { - background-color: #fff; -} - -.leaflet-touch .leaflet-control-draw a { - width: 27px; - height: 27px; -} - -.leaflet-control-draw-polyline { - background-image: url(images/draw-polyline.png); -} - -.leaflet-control-draw-polygon { - background-image: url(images/draw-polygon.png); -} - -.leaflet-control-draw-rectangle { - background-image: url(images/draw-rectangle.png); -} - -.leaflet-control-draw-circle { - background-image: url(images/draw-circle.png); -} - -.leaflet-control-draw-marker { - background-image: url(images/draw-marker-icon.png); -} - -.leaflet-mouse-marker { - background-color: #fff; - cursor: crosshair; -} - -.leaflet-draw-label { - background-color: #fff; - border: 1px solid #ccc; - color: #222; - font: 12px/18px "Helvetica Neue", Arial, Helvetica, sans-serif; - margin-left: 20px; - margin-top: -21px; - padding: 2px 4px; - position: absolute; - white-space: nowrap; - z-index: 6; -} - -.leaflet-error-draw-label { - background-color: #F2DEDE; - border-color: #E6B6BD; - color: #B94A48; -} - -.leaflet-draw-label-single { - margin-top: -12px -} - -.leaflet-draw-label-subtext { - color: #999; -} - -.leaflet-draw-guide-dash { - font-size: 1%; - opacity: 0.6; - position: absolute; - width: 5px; - height: 5px; -} - -.leaflet-flash-anim { - -webkit-animation-duration: 0.66s; - -moz-animation-duration: 0.66s; - -o-animation-duration: 0.66s; - animation-duration: 0.66s; - -webkit-animation-fill-mode: both; - -moz-animation-fill-mode: both; - -o-animation-fill-mode: both; - animation-fill-mode: both; - -webkit-animation-name: leaflet-flash; - -moz-animation-name: leaflet-flash; - -o-animation-name: leaflet-flash; - animation-name: leaflet-flash; -} - -@-webkit-keyframes leaflet-flash { - 0%, 50%, 100% { opacity: 1; } - 25%, 75% { opacity: 0.3; } -} - -@-moz-keyframes leaflet-flash { - 0%, 50%, 100% { opacity: 1; } - 25%, 75% { opacity: 0.3; } -} - -@-o-keyframes leaflet-flash { - 0%, 50%, 100% { opacity: 1; } - 25%, 75% { opacity: 0.3; } -} - -@keyframes leaflet-flash { - 0%, 50%, 100% { opacity: 1; } - 25%, 75% { opacity: 0; } -} \ No newline at end of file diff --git a/dist/leaflet.draw.0.1.6.js b/dist/leaflet.draw.0.1.6.js deleted file mode 100644 index 49bb67b5..00000000 --- a/dist/leaflet.draw.0.1.6.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - Copyright (c) 2012, Smartrak, Jacob Toye - Leaflet.draw is an open-source JavaScript library for drawing shapes/markers on leaflet powered maps. - https://github.com/jacobtoye/Leaflet.draw -*/ -(function(e,t){L.drawVersion="0.1.6",L.Util.extend(L.LineUtil,{segmentsIntersect:function(e,t,n,r){return this._checkCounterclockwise(e,n,r)!==this._checkCounterclockwise(t,n,r)&&this._checkCounterclockwise(e,t,n)!==this._checkCounterclockwise(e,t,r)},_checkCounterclockwise:function(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}}),L.Polyline.include({intersects:function(){var e=this._originalPoints,t=e?e.length:0,n,r,i,s,o,u;if(this._tooFewPointsForIntersection())return!1;for(n=t-1;n>=3;n--){i=e[n-1],s=e[n];if(this._lineSegmentsIntersectsRange(i,s,n-2))return!0}return!1},newLatLngIntersects:function(e,t){return this._map?this.newPointIntersects(this._map.latLngToLayerPoint(e),t):!1},newPointIntersects:function(e,t){var n=this._originalPoints,r=n?n.length:0,i=n?n[r-1]:null,s=r-2;return this._tooFewPointsForIntersection(1)?!1:this._lineSegmentsIntersectsRange(i,e,s,t?1:0)},_tooFewPointsForIntersection:function(e){var t=this._originalPoints,n=t?t.length:0;return n+=e||0,!this._originalPoints||n<=3},_lineSegmentsIntersectsRange:function(e,t,n,r){var i=this._originalPoints,s,o;r=r||0;for(var u=n;u>r;u--){s=i[u-1],o=i[u];if(L.LineUtil.segmentsIntersect(e,t,s,o))return!0}return!1}}),L.Polygon.include({intersects:function(){var e,t=this._originalPoints,n,r,i,s;return this._tooFewPointsForIntersection()?!1:(e=L.Polyline.prototype.intersects.call(this),e?!0:(n=t.length,r=t[0],i=t[n-1],s=n-2,this._lineSegmentsIntersectsRange(i,r,s,1)))}}),L.Handler.Draw=L.Handler.extend({includes:L.Mixin.Events,initialize:function(e,t){this._map=e,this._container=e._container,this._overlayPane=e._panes.overlayPane,this._popupPane=e._panes.popupPane,t&&t.shapeOptions&&(t.shapeOptions=L.Util.extend({},this.options.shapeOptions,t.shapeOptions)),L.Util.extend(this.options,t)},enable:function(){this.fire("activated"),this._map.fire("drawing",{drawingType:this.type}),L.Handler.prototype.enable.call(this)},disable:function(){this._map.fire("drawing-disabled",{drawingType:this.type}),L.Handler.prototype.disable.call(this)},addHooks:function(){this._map&&(L.DomUtil.disableTextSelection(),this._label=L.DomUtil.create("div","leaflet-draw-label",this._popupPane),this._singleLineLabel=!1,L.DomEvent.addListener(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._popupPane.removeChild(this._label),delete this._label,L.DomEvent.removeListener(this._container,"keyup",this._cancelDrawing))},_updateLabelText:function(e){e.subtext=e.subtext||"",e.subtext.length===0&&!this._singleLineLabel?(L.DomUtil.addClass(this._label,"leaflet-draw-label-single"),this._singleLineLabel=!0):e.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._label,"leaflet-draw-label-single"),this._singleLineLabel=!1),this._label.innerHTML=(e.subtext.length>0?''+e.subtext+""+"
":"")+""+e.text+""},_updateLabelPosition:function(e){L.DomUtil.setPosition(this._label,e)},_cancelDrawing:function(e){e.keyCode===27&&this.disable()}}),L.Polyline.Draw=L.Handler.Draw.extend({Poly:L.Polyline,type:"polyline",options:{allowIntersection:!0,drawError:{color:"#b00b00",message:"Error: shape edges cannot cross!",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),guidelineDistance:20,shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!1,clickable:!0},zIndexOffset:2e3},initialize:function(e,t){t&&t.drawError&&(t.drawError=L.Util.extend({},this.options.drawError,t.drawError)),L.Handler.Draw.prototype.initialize.call(this,e,t)},addHooks:function(){L.Handler.Draw.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._updateLabelText(this._getLabelText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){L.Handler.Draw.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("click",this._onClick),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mousemove",this._onMouseMove)},_finishShape:function(){if(!this.options.allowIntersection&&this._poly.newLatLngIntersects(this._poly.getLatLngs()[0],!0)){this._showErrorLabel();return}if(!this._shapeIsValid()){this._showErrorLabel();return}this._map.fire("draw:poly-created",{poly:new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions)}),this.disable()},_shapeIsValid:function(){return!0},_onMouseMove:function(e){var t=e.layerPoint,n=e.latlng,r=this._markers.length;this._currentLatLng=n,this._updateLabelPosition(t),r>0&&(this._updateLabelText(this._getLabelText()),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[r-1].getLatLng()),t)),this._mouseMarker.setLatLng(n),L.DomEvent.preventDefault(e.originalEvent)},_onClick:function(e){var t=e.target.getLatLng(),n=this._markers.length;if(n>0&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)){this._showErrorLabel();return}this._errorShown&&this._hideErrorLabel(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._updateMarkerHandler(),this._vertexAdded(t)},_updateMarkerHandler:function(){this._markers.length>1&&this._markers[this._markers.length-1].on("click",this._finishShape,this),this._markers.length>2&&this._markers[this._markers.length-2].off("click",this._finishShape)},_createMarker:function(e){var t=new L.Marker(e,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset*2});return this._markerGroup.addLayer(t),t},_drawGuide:function(e,t){var n=Math.floor(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))),r,i,s,o;this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));for(r=this.options.guidelineDistance;r1e3?(t/1e3).toFixed(2)+" km":Math.ceil(t)+" m",this._markers.length===1?e={text:"Click to continue drawing line.",subtext:n}:e={text:"Click last point to finish line.",subtext:n}),e},_showErrorLabel:function(){this._errorShown=!0,L.DomUtil.addClass(this._label,"leaflet-error-draw-label"),L.DomUtil.addClass(this._label,"leaflet-flash-anim"),L.Handler.Draw.prototype._updateLabelText.call(this,{text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorLabel,this),this.options.drawError.timeout)},_hideErrorLabel:function(){this._errorShown=!1,this._clearHideErrorTimeout(),L.DomUtil.removeClass(this._label,"leaflet-error-draw-label"),L.DomUtil.removeClass(this._label,"leaflet-flash-anim"),this._updateLabelText(this._getLabelText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_vertexAdded:function(e){this._markers.length===1?this._measurementRunningTotal=0:this._measurementRunningTotal+=e.distanceTo(this._markers[this._markers.length-2].getLatLng())},_cleanUpShape:function(){this._markers.length>0&&this._markers[this._markers.length-1].off("click",this._finishShape)}}),L.Polygon.Draw=L.Polyline.Draw.extend({Poly:L.Polygon,type:"polygon",options:{shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!1}},_updateMarkerHandler:function(){this._markers.length===1&&this._markers[0].on("click",this._finishShape,this)},_getLabelText:function(){var e;return this._markers.length===0?e="Click to start drawing shape.":this._markers.length<3?e="Click to continue drawing shape.":e="Click first point to close this shape.",{text:e}},_shapeIsValid:function(){return this._markers.length>=3},_vertexAdded:function(e){},_cleanUpShape:function(){this._markers.length>0&&this._markers[0].off("click",this._finishShape)}}),L.SimpleShape={},L.SimpleShape.Draw=L.Handler.Draw.extend({addHooks:function(){L.Handler.Draw.prototype.addHooks.call(this),this._map&&(this._map.dragging.disable(),this._container.style.cursor="crosshair",this._updateLabelText({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this))},removeHooks:function(){L.Handler.Draw.prototype.removeHooks.call(this),this._map&&(this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this),L.DomEvent.off(document,"mouseup",this._onMouseUp),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_onMouseDown:function(e){this._isDrawing=!0,this._startLatLng=e.latlng,L.DomEvent.on(document,"mouseup",this._onMouseUp,this).preventDefault(e.originalEvent)},_onMouseMove:function(e){var t=e.layerPoint,n=e.latlng;this._updateLabelPosition(t),this._isDrawing&&(this._updateLabelText({text:"Release mouse to finish drawing."}),this._drawShape(n))},_onMouseUp:function(e){this._shape&&this._fireCreatedEvent(),this.disable()}}),L.Circle.Draw=L.SimpleShape.Draw.extend({type:"circle",options:{shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0}},_initialLabelText:"Click and drag to draw circle.",_drawShape:function(e){this._shape?this._shape.setRadius(this._startLatLng.distanceTo(e)):(this._shape=new L.Circle(this._startLatLng,this._startLatLng.distanceTo(e),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){this._map.fire("draw:circle-created",{circ:new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions)})}}),L.Rectangle.Draw=L.SimpleShape.Draw.extend({type:"rectangle",options:{shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0}},_initialLabelText:"Click and drag to draw rectangle.",_drawShape:function(e){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,e)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,e),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){this._map.fire("draw:rectangle-created",{rect:new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions)})}}),L.Marker.Draw=L.Handler.Draw.extend({type:"marker",options:{icon:new L.Icon.Default,zIndexOffset:2e3},addHooks:function(){L.Handler.Draw.prototype.addHooks.call(this),this._map&&(this._updateLabelText({text:"Click map to place marker."}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){L.Handler.Draw.prototype.removeHooks.call(this),this._map&&(this._marker&&(this._marker.off("click",this._onClick),this._map.off("click",this._onClick).removeLayer(this._marker),delete this._marker),this._map.off("mousemove",this._onMouseMove))},_onMouseMove:function(e){var t=e.layerPoint,n=e.latlng;this._updateLabelPosition(t),this._marker?this._marker.setLatLng(n):(this._marker=new L.Marker(n,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset}),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_onClick:function(e){this._map.fire("draw:marker-created",{marker:new L.Marker(this._marker.getLatLng(),{icon:this.options.icon})}),this.disable()}}),L.Map.mergeOptions({drawControl:!1}),L.Control.Draw=L.Control.extend({options:{position:"topleft",polyline:{title:"Draw a polyline"},polygon:{title:"Draw a polygon"},rectangle:{title:"Draw a rectangle"},circle:{title:"Draw a circle"},marker:{title:"Add a marker"}},initialize:function(e){L.Util.extend(this.options,e)},onAdd:function(e){var t="leaflet-control-draw",n="leaflet-bar",r=n+"-part",i=L.DomUtil.create("div",t+" "+n),s=[];return this.handlers={},this.options.polyline&&(this.handlers.polyline=new L.Polyline.Draw(e,this.options.polyline),s.push(this._createButton(this.options.polyline.title,t+"-polyline "+r,i,this.handlers.polyline.enable,this.handlers.polyline)),this.handlers.polyline.on("activated",this._disableInactiveModes,this)),this.options.polygon&&(this.handlers.polygon=new L.Polygon.Draw(e,this.options.polygon),s.push(this._createButton(this.options.polygon.title,t+"-polygon "+r,i,this.handlers.polygon.enable,this.handlers.polygon)),this.handlers.polygon.on("activated",this._disableInactiveModes,this)),this.options.rectangle&&(this.handlers.rectangle=new L.Rectangle.Draw(e,this.options.rectangle),s.push(this._createButton(this.options.rectangle.title,t+"-rectangle "+r,i,this.handlers.rectangle.enable,this.handlers.rectangle)),this.handlers.rectangle.on("activated",this._disableInactiveModes,this)),this.options.circle&&(this.handlers.circle=new L.Circle.Draw(e,this.options.circle),s.push(this._createButton(this.options.circle.title,t+"-circle "+r,i,this.handlers.circle.enable,this.handlers.circle)),this.handlers.circle.on("activated",this._disableInactiveModes,this)),this.options.marker&&(this.handlers.marker=new L.Marker.Draw(e,this.options.marker),s.push(this._createButton(this.options.marker.title,t+"-marker "+r,i,this.handlers.marker.enable,this.handlers.marker)),this.handlers.marker.on("activated",this._disableInactiveModes,this)),L.DomUtil.addClass(s[0],r+"-top"),L.DomUtil.addClass(s[s.length-1],r+"-bottom"),i},_createButton:function(e,t,n,r,i){var s=L.DomUtil.create("a",t,n);return s.href="#",s.title=e,L.DomEvent.on(s,"click",L.DomEvent.stopPropagation).on(s,"mousedown",L.DomEvent.stopPropagation).on(s,"dblclick",L.DomEvent.stopPropagation).on(s,"click",L.DomEvent.preventDefault).on(s,"click",r,i),s},_disableInactiveModes:function(){for(var e in this.handlers)this.handlers.hasOwnProperty(e)&&this.handlers[e].enabled()&&this.handlers[e].disable()}}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))})})(this); \ No newline at end of file diff --git a/dist/leaflet_google.js b/dist/leaflet_google.js deleted file mode 100644 index a89575e6..00000000 --- a/dist/leaflet_google.js +++ /dev/null @@ -1,153 +0,0 @@ -/* - * L.TileLayer is used for standard xyz-numbered tile layers. - */ -L.Google = L.Class.extend({ - includes: L.Mixin.Events, - - options: { - minZoom: 0, - maxZoom: 18, - tileSize: 256, - subdomains: 'abc', - errorTileUrl: '', - attribution: '', - opacity: 1, - continuousWorld: false, - noWrap: false, - }, - - // Possible types: SATELLITE, ROADMAP, HYBRID, INGRESS - initialize: function(type, options, styles) { - L.Util.setOptions(this, options); - if(type === 'INGRESS') { - type = 'ROADMAP'; - this._styles = [{featureType:"all", elementType:"all", stylers:[{visibility:"on"}, {hue:"#131c1c"}, {saturation:"-50"}, {invert_lightness:true}]}, {featureType:"water", elementType:"all", stylers:[{visibility:"on"}, {hue:"#005eff"}, {invert_lightness:true}]}, {featureType:"poi", stylers:[{visibility:"off"}]}, {featureType:"transit", elementType:"all", stylers:[{visibility:"off"}]}]; - } else { - this._styles = null; - } - this._type = google.maps.MapTypeId[type || 'SATELLITE']; - }, - - onAdd: function(map, insertAtTheBottom) { - this._map = map; - this._insertAtTheBottom = insertAtTheBottom; - - // create a container div for tiles - this._initContainer(); - this._initMapObject(); - - // set up events - map.on('viewreset', this._resetCallback, this); - - this._limitedUpdate = L.Util.limitExecByInterval(this._update, 150, this); - map.on('move', this._update, this); - //map.on('moveend', this._update, this); - - this._reset(); - this._update(); - }, - - onRemove: function(map) { - this._map._container.removeChild(this._container); - //this._container = null; - - this._map.off('viewreset', this._resetCallback, this); - - this._map.off('move', this._update, this); - //this._map.off('moveend', this._update, this); - }, - - getAttribution: function() { - return this.options.attribution; - }, - - setOpacity: function(opacity) { - this.options.opacity = opacity; - if (opacity < 1) { - L.DomUtil.setOpacity(this._container, opacity); - } - }, - - _initContainer: function() { - var tilePane = this._map._container - first = tilePane.firstChild; - - if (!this._container) { - this._container = L.DomUtil.create('div', 'leaflet-google-layer leaflet-top leaflet-left'); - this._container.id = "_GMapContainer"; - } - - if (true) { - tilePane.insertBefore(this._container, first); - - this.setOpacity(this.options.opacity); - var size = this._map.getSize(); - this._container.style.width = size.x + 'px'; - this._container.style.height = size.y + 'px'; - } - }, - - _initMapObject: function() { - this._google_center = new google.maps.LatLng(0, 0); - var map = new google.maps.Map(this._container, { - center: this._google_center, - zoom: 0, - tilt: 0, - styles: this._styles, - mapTypeId: this._type, - disableDefaultUI: true, - keyboardShortcuts: false, - draggable: false, - disableDoubleClickZoom: true, - scrollwheel: false, - streetViewControl: false - }); - - var _this = this; - this._reposition = google.maps.event.addListenerOnce(map, "center_changed", - function() { _this.onReposition(); }); - - map.backgroundColor = '#ff0000'; - this._google = map; - }, - - _resetCallback: function(e) { - this._reset(e.hard); - }, - - _reset: function(clearOldContainer) { - this._initContainer(); - }, - - _update: function() { - this._resize(); - - var bounds = this._map.getBounds(); - var ne = bounds.getNorthEast(); - var sw = bounds.getSouthWest(); - var google_bounds = new google.maps.LatLngBounds( - new google.maps.LatLng(sw.lat, sw.lng), - new google.maps.LatLng(ne.lat, ne.lng) - ); - var center = this._map.getCenter(); - var _center = new google.maps.LatLng(center.lat, center.lng); - - this._google.setCenter(_center); - this._google.setZoom(this._map.getZoom()); - //this._google.fitBounds(google_bounds); - }, - - _resize: function() { - var size = this._map.getSize(); - if (parseInt(this._container.style.width) == size.x && - parseInt(this._container.style.height) == size.y) - return; - this._container.style.width = size.x + 'px'; - this._container.style.height = size.y + 'px'; - google.maps.event.trigger(this._google, "resize"); - }, - - onReposition: function() { - //google.maps.event.trigger(this._google, "resize"); - } -}); diff --git a/dist/style.0.7.css b/dist/style.0.7.css deleted file mode 100644 index 942c733a..00000000 --- a/dist/style.0.7.css +++ /dev/null @@ -1,717 +0,0 @@ -/* general rules ******************************************************/ - -html, body, #map { - height: 100%; - width: 100%; -} - -body { - font-size: 14px; - font-family: "coda",arial,helvetica,sans-serif; - margin: 0; -} - -#scrollwrapper { - overflow: hidden; - position: fixed; - right: -38px; - top: 0; - width: 340px; - bottom: 45px; - z-index: 1001; -} - -#sidebar { - background-color: rgba(8, 48, 78, 0.9); - border-left: 1px solid #20A8B1; - color: #888; - position: relative; - left: 0; - top: 0; - max-height: 100%; - overflow-y:scroll; - overflow-x:hidden; - z-index: 3000; -} - -#sidebartoggle { - display: block; - padding: 20px 5px; - margin-top: -31px; /* -(toggle height / 2) */ - line-height: 10px; - position: absolute; - top: 340px; /* (sidebar height / 2) */ - z-index: 3001; - background-color: rgba(8, 48, 78, 0.9); - color: #FFCE00; - border: 1px solid #20A8B1; - border-right: none; - border-radius: 5px 0 0 5px; - text-decoration: none; -} - -.enl { - color: #03fe03 !important; -} - -.res { - color: #00c5ff !important; -} - -.none { - color: #fff; -} - -a { - color: #ffce00; - cursor: pointer; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -/* map display, required because GMaps uses a high z-index which is - * normally above Leaflet’s vector pane */ -.leaflet-map-pane { - z-index: 1000; -} - -.leaflet-control-layers-overlays label.disabled { - text-decoration: line-through; - cursor: help; -} - -.help { - cursor: help; -} - -.toggle { - display: block; - height: 0; - width: 0; -} - - -/* chat ***************************************************************/ - -#chatcontrols { - color: #FFCE00; - background: rgba(8, 48, 78, 0.9); - position: absolute; - left: 0; - z-index: 3001; - height: 26px; - padding-left:1px; -} - -#chatcontrols.expand { - top: 0; - bottom: auto; -} - -#chatcontrols a { - margin-left: -1px; - display: inline-block; - width: 94px; - text-align: center; - height: 24px; - line-height: 24px; - border: 1px solid #20A8B1; - vertical-align: top; -} - -#chatcontrols a:first-child { - letter-spacing:-1px; - text-decoration: none !important; -} - -#chatcontrols a.active { - border-color: #FFCE00; - border-bottom-width:0px; - font-weight:bold -} - -#chatcontrols a.active + a { - border-left-color: #FFCE00 -} - - -#chatcontrols .toggle { - border-left: 10px solid transparent; - border-right: 10px solid transparent; - margin: 6px auto auto; -} - -#chatcontrols .expand { - border-bottom: 10px solid #FFCE00; -} - -#chatcontrols .shrink { - border-top: 10px solid #FFCE00; -} - - -#chat { - position: absolute; - width: 708px; - bottom: 23px; - left: 0; - z-index: 3000; - background: rgba(8, 48, 78, 0.9); - font-size: 12.6px; - color: #eee; - border: 1px solid #20A8B1; - border-bottom: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -em { - color: red; - font-style: normal; -} - -#chat.expand { - height:auto; - top: 25px; -} - -#chatpublic, #chatfull, #chatcompact { - display: none; -} - -#chat > div { - overflow-x:hidden; - overflow-y:scroll; - height: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 2px; - position:relative; -} - -#chat table, #chatinput table { - width: 100%; - table-layout: fixed; - border-spacing: 0m; - border-collapse: collapse; -} - -#chatinput table { - height: 100%; -} - -#chat td, #chatinput td { - font-family: Verdana, sans-serif; - font-size: 12.6px; - vertical-align: top; - padding-bottom: 3px; -} - -/* time */ -#chat td:first-child, #chatinput td:first-child { - width: 44px; - overflow: hidden; - padding-left: 2px; - color: #bbb; - white-space: nowrap; -} - -#chat time { - cursor: help; -} - -/* nick */ -#chat td:nth-child(2), #chatinput td:nth-child(2) { - width: 91px; - overflow: hidden; - padding-left: 2px; - white-space: nowrap; -} - -mark { - background: transparent; -} - -.invisep { - display: inline-block; - width: 1px; - height: 1px; - overflow:hidden; - color: transparent; -} - -/* divider */ -summary { - color: #bbb; - display: inline-block; - font-family: Verdana,sans-serif; - height: 16px; - overflow: hidden; - padding: 0 2px; - white-space: nowrap; - width: 100%; -} - -#chatinput { - position: absolute; - bottom: 0; - left: 0; - padding: 0 2px; - background: rgba(8, 48, 78, 0.9); - width: 708px; - border: 1px solid #20A8B1; - z-index: 3001; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -#chatinput td { - padding-bottom: 1px; - vertical-align: middle; -} - - -#chatinput input { - background: transparent; - font-size: 12.6px; - font-family: Verdana,sans-serif; - color: #EEEEEE; - width: 100%; - height: 100%; -} - - - -/* sidebar ************************************************************/ - -#sidebar > * { - border-bottom: 1px solid #20A8B1; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - - - -#sidebartoggle .toggle { - border-bottom: 10px solid transparent; - border-top: 10px solid transparent; -} - -#sidebartoggle .open { - border-right: 10px solid #FFCE00; -} - -#sidebartoggle .close { - border-left: 10px solid #FFCE00; -} - -/* player stats */ -#playerstat { - height: 30px; -} - -h2 { - color: #ffce00; - font-size: 21px; - padding: 0 4px; - margin: 0; - cursor:help; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - width: 100%; -} - -h2 span { - display: inline-block; - overflow: hidden; - text-overflow: "~"; - vertical-align: top; - white-space: nowrap; - width: 205px; -} - -h2 div { - float: right; - height: 100%; - overflow: hidden; -} - -h2 sup, h2 sub { - display: block; - font-size: 11px; - margin-bottom: -1px; -} - - -/* gamestats */ -#gamestat { - height: 22px; -} - -#gamestat span { - display: block; - float: left; - font-weight: bold; - cursor:help; - height: 21px; - line-height: 22px; -} - -#gamestat .res { - background: #005684; - text-align: right; -} - -#gamestat .enl { - background: #017f01; -} - - -/* geosearch input, and others */ -input { - background-color: rgba(0, 0, 0, 0.3); - color: #ffce00; - height: 24px; - padding:3px 4px 1px 4px; - font-size: 14px; - border:0; - font-family:inherit; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -::-webkit-input-placeholder { - font-style: italic; -} - -:-moz-placeholder { - font-style: italic; -} - -::-moz-placeholder { - font-style: italic; -} - -.leaflet-control-layers input { - height: auto; - padding: 0; -} - -/* portal title and image */ -h3 { - font-size: 17px; - padding: 0 4px; - margin:0; - height: 25px; - width: 100%; - overflow:hidden; - text-overflow: "~"; - white-space: nowrap; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.imgpreview { - height: 200px; - background: no-repeat center center; - background-size: contain; - cursor: help; - overflow: hidden; -} - -.imgpreview img.hide { - display: none; -} - -#level { - font-size: 40px; - text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000, 0 0 5px #fff; - display: block; - margin-right: 15px; - text-align:right; -} - -/* portal mods */ -.mods { - margin: 5px auto 1px auto; - padding: 0 2px; - width: 296px; - height: 75px; - text-align: center; -} - -.mods span { - background-color: rgba(0, 0, 0, 0.3); - /* can’t use inline-block because Webkit’s implementation is buggy and - * introduces additional margins in random cases. No clear necessary, - * as that’s solved by setting height on .mods. */ - display: block; - float:left; - height: 63px; - margin: 0 2px; - overflow: hidden; - padding: 2px; - text-align: center; - width: 63px; - cursor:help; - border: 1px solid #666; -} - -.mods span:not([title]) { - cursor: auto; -} - -.res .mods span, .res .meter { - border: 1px solid #0076b6; -} -.enl .mods span, .enl .meter { - border: 1px solid #017f01; -} - -/* random details, resonator details */ -#randdetails, #resodetails { - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 0 4px; - table-layout: fixed; - border-spacing: 0m; - border-collapse: collapse; -} - -#randdetails td, #resodetails td { - overflow: hidden; - text-overflow: "~"; - vertical-align: top; - white-space: nowrap; - width: 50%; - width: calc(50% - 62px); -} - -#randdetails th, #resodetails th { - font-weight: normal; - text-align: right; - width: 62px; - padding-right:4px; - padding-left:4px; -} - -#randdetails th + th, #resodetails th + th { - text-align: left; - padding-right: 4px; - padding-left: 4px; -} - -#randdetails td:first-child, #resodetails td:first-child { - text-align: right; - padding-left: 2px; -} - -#randdetails td:last-child, #resodetails td:last-child { - text-align: left; - padding-right: 2px; -} - - -#randdetails { - margin-top: 9px; - margin-bottom: 9px; -} - - -#randdetails tt { - font-family: inherit; - cursor: help; -} - -/* resonators */ -#resodetails { - margin-bottom: 9px; -} - -.meter { - background: #000; - cursor: help; - display: inline-block; - height: 18px; - padding: 1px; - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - position: relative; - left: 0; - top: 0; -} - -.meter span { - display: block; - height: 14px; -} - -.meter-level { - position: absolute; - top: -2px; - left: 50%; - margin-left: -6px; - text-shadow: 0.0em 0.0em 0.3em #808080; -} -/* links below resos */ - -.linkdetails { - margin-bottom: 8px; -} - -aside { - display: inline-block; - padding-right: 9px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - text-align: center; -} - -.linkdetails aside:last-child { - padding-right: 0; -} - -.linkdetails aside:nth-child(1) { - text-align: right; - width:88px; -} - -.linkdetails aside:nth-child(2) { - text-align: right; - width:67px; -} - -.linkdetails aside:nth-child(4) { - margin-left:13px; -} - -#toolbox { - padding: 4px 2px; - font-size:90%; -} - -#toolbox > a { - padding: 4px; -} - -/* a common portal display takes this much space (prevents moving - * content when first selecting a portal) */ - -#portaldetails { - min-height: 553px; -} - - -/* update status */ -#updatestatus { - background-color: rgba(8, 48, 78, 0.9); - border-bottom: 0; - border-top: 1px solid #20A8B1; - border-left: 1px solid #20A8B1; - bottom: 0; - color: #ffce00; - font-size:13px; - padding: 4px; - position: fixed; - right: 0; - z-index:3002; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - - -/* preview */ - -#largepreview { - left: 50%; - position: fixed; - top: 50%; - z-index: 2000; -} -#largepreview img { - box-shadow: 0 0 40px #000; -} -#largepreview img { - border: 2px solid #f8ff5e; -} - -/* tooltips, dialogs */ -.ui-tooltip, .ui-dialog { - max-width: 300px; - position: absolute; - z-index: 9999; - background-color: #fff; - border: 1px solid #ccc; - color: #222; - font: 13px/15px "Helvetica Neue", Arial, Helvetica, sans-serif; - padding: 2px 4px; -} - -.ui-dialog { - border: 1px solid #0F0F0F; - padding: 0; - border-radius: 2px; -} - -.ui-widget-overlay { - height: 100%; - left: 0; - position: fixed; - top: 0; - width: 100%; - z-index:9998; - background: #444; - opacity: 0.6; -} - -.ui-dialog-titlebar { - display: none; -} - -.ui-dialog-content { - padding: 12px; - overflow-y: auto; - overflow-x: hidden; - max-height: 600px !important; - max-width: 700px !important; -} - -.ui-dialog-buttonpane { - background: #F2F2F2; - padding: 12px; - border-top: 1px solid #E6E6E6; -} - -.ui-dialog-buttonset { - text-align: right; -} - -.ui-dialog-buttonset button { - padding: 2px; - min-width: 80px; -} - -td { - padding: 0; - vertical-align: top; -} - -td + td { - padding-left: 4px; -} diff --git a/dist/style.css b/dist/style.css deleted file mode 100644 index 43abdb69..00000000 --- a/dist/style.css +++ /dev/null @@ -1,601 +0,0 @@ -/* general rules ******************************************************/ - -html, body, #map { - height: 100%; -} - -body { - font-size: 14px; - font-family: "coda",arial,helvetica,sans-serif; - margin: 0; -} - -#scrollwrapper { - overflow: hidden; - position: fixed; - right: -38px; - top: 0; - width: 340px; - bottom: 45px; - z-index: 1001; -} - -#sidebar { - background-color: rgba(8, 48, 78, 0.9); - border-left: 1px solid #20A8B1; - color: #888; - position: relative; - left: 0; - top: 0; - max-height: 100%; - overflow-y:scroll; - overflow-x:hidden; - z-index: 3000; -} - -#sidebartoggle { - display: block; - padding: 20px 5px; - margin-top: -31px; /* -(toggle height / 2) */ - line-height: 10px; - position: absolute; - top: 340px; /* (sidebar height / 2) */ - z-index: 3001; - background-color: rgba(8, 48, 78, 0.9); - color: #FFCE00; - border: 1px solid #20A8B1; - border-right: none; - border-radius: 5px 0 0 5px; - text-decoration: none; -} - -.enl { - color: #03fe03 !important; -} - -.res { - color: #00c5ff !important; -} - -.none { - color: #fff; -} - -a { - color: #ffce00; - cursor: pointer; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -/* map display, required because GMaps uses a high z-index which is - * normally above Leaflet’s vector pane */ -.leaflet-map-pane { - z-index: 1000; -} - -.leaflet-control-layers-overlays label.disabled { - text-decoration: line-through; - cursor: help; -} - -.help { - cursor: help; -} - -.toggle { - display: block; - height: 0; - width: 0; -} - - -/* chat ***************************************************************/ - -#chatcontrols { - color: #FFCE00; - background: rgba(8, 48, 78, 0.9); - position: absolute; - left: 0; - z-index: 3001; - height: 26px; - padding-left:1px; -} - -#chatcontrols.expand { - top: 0; - bottom: auto; -} - -#chatcontrols a { - margin-left: -1px; - display: inline-block; - width: 94px; - text-align: center; - height: 24px; - line-height: 24px; - border: 1px solid #20A8B1; - vertical-align: top; -} - -#chatcontrols a:first-child { - letter-spacing:-1px; - text-decoration: none !important; -} - -#chatcontrols a.active { - border-color: #FFCE00; - border-bottom-width:0px; - font-weight:bold -} - -#chatcontrols a.active + a { - border-left-color: #FFCE00 -} - - -#chatcontrols .toggle { - border-left: 10px solid transparent; - border-right: 10px solid transparent; - margin: 6px auto auto; -} - -#chatcontrols .expand { - border-bottom: 10px solid #FFCE00; -} - -#chatcontrols .shrink { - border-top: 10px solid #FFCE00; -} - - -#chat { - position: absolute; - width: 708px; - bottom: 24px; - left: 0; - z-index: 3000; - background: rgba(8, 48, 78, 0.9); - font-size: 12.6px; - color: #eee; - border: 1px solid #20A8B1; - border-bottom: 0; -} - -em { - color: red; - font-style: normal; -} - -#chat.expand { - height:auto; - top: 25px; -} - -#chatpublic, #chatautomated { - display: none; -} - -#chat > div { - overflow-x:hidden; - overflow-y:scroll; - height: 100%; /* fallback for Opera which doesn’t support calc */ - height: calc(100% - 4px); - height: -webkit-calc(100% - 4px); - height: -moz-calc(100% - 4px); - padding: 2px; - position:relative; -} - -#chat p { - display: block; - padding: 1px 2px; - margin:0; -} - -#chat time { - cursor: help; -} - -time, mark, #chat span, #chat a { - font-family: Verdana, sans-serif; - font-size: 12.6px; - vertical-align: top; -} - -time { - display: inline-block; - width: 44px; - color: #bbb; -} - -mark { - display: inline-block; - width: 91px; - margin-right:4px; - overflow:hidden; - vertical-align: top; - background: transparent; -} - -summary { - color: #bbb; - display: inline-block; - font-family: Verdana,sans-serif; - height: 16px; - overflow: hidden; - padding: 0 2px; - white-space: nowrap; - width: 683px; -} - -#chat span { - display: inline-block; - width: 540px; -} - -#chatinput { - line-height:22px; - padding: 0 4px; - position: absolute; - bottom: 0; - left: 0; - background: rgba(8, 48, 78, 0.9); - width: 700px; - border: 1px solid #20A8B1; - z-index: 3001; -} - -#chat .invisibleseparator { - color: rgba(8, 48, 78, 0.0); - overflow: hidden; - width: 0px; -} - - -#chatinput span { - font-family: Verdana,sans-serif; - display: inline-block; - font-size: 12.6px; - width: 84px; - color: red; - padding: 0 4px 0 1px; - width: 85px; -} - -#chatinput input { - background: transparent; - font-size: 12.6px; - font-family: Verdana,sans-serif; - color: #EEEEEE; - width: 558px -} - - - -/* sidebar ************************************************************/ - -#sidebar > * { - border-bottom: 1px solid #20A8B1; -} - - - -#sidebartoggle .toggle { - border-bottom: 10px solid transparent; - border-top: 10px solid transparent; -} - -#sidebartoggle .open { - border-right: 10px solid #FFCE00; -} - -#sidebartoggle .close { - border-left: 10px solid #FFCE00; -} - -/* player stats */ -#playerstat { - height: 30px; -} - -h2 { - color: #ffce00; - font-size: 21px; - padding: 0 4px; - margin: 0; - cursor:help; -} - -h2 span { - display: inline-block; - overflow: hidden; - text-overflow: "~"; - vertical-align: top; - white-space: nowrap; - width: 205px; -} - -h2 div { - float: right; - height: 100%; - overflow: hidden; -} - -h2 sup, h2 sub { - display: block; - font-size: 11px; - margin-bottom: -1px; -} - - -/* gamestats */ -#gamestat, #gamestat span { - height: 22px; - line-height: 22px; -} - -#gamestat span { - display: block; - float: left; - font-weight: bold; - cursor:help; -} - -#gamestat .res { - background: #005684; - text-align: right; -} - -#gamestat .enl { - background: #017f01; -} - - -/* geosearch input, and others */ -input { - background-color: rgba(0, 0, 0, 0.3); - color: #ffce00; - height: 22px; - line-height: 22px; - padding: 0 4px; - font-size: 14px; - border:0; - font-family:inherit; -} - -::-webkit-input-placeholder { - font-style: italic; -} - -:-moz-placeholder { - font-style: italic; -} - -::-moz-placeholder { - font-style: italic; -} - - -/* portal title and image */ -h3 { - font-size: 17px; - padding: 0 4px; - margin:0; - height: 25px; - width: 100%; - overflow:hidden; - text-overflow: "~"; - white-space: nowrap; -} - -.imgpreview { - height: 200px; - overflow: hidden; -} - -.imgpreview img { - cursor: help; -} - -#level { - font-size: 40px; - position: absolute; - right: 10px; - text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000, 0 0 5px #fff; - top: 100px; -} - -/* portal mods */ -.mods { - margin-bottom: 1px; - margin-top: 5px; - height: 75px; -} - -.mods span { - background-color: rgba(0, 0, 0, 0.3); - /* can’t use inline-block because Webkit’s implementation is buggy and - * introduces additional margins in random cases. No clear necessary, - * as that’s solved by setting height on .mods. */ - display: block; - float:left; - height: 63.7px; - margin-left: 4px; - overflow: hidden; - padding: 2px; - text-align: center; - width: 63.7px; - cursor:help; - border: 1px solid #666; -} - -.mods span[title=""] { - cursor: auto; -} - -.res .mods span, .res .meter { - border: 1px solid #0076b6; -} -.enl .mods span, .enl .meter { - border: 1px solid #017f01; -} - -/* random details list */ -#randdetails { - margin: 0 4px; - margin-top: 11px; -} - -aside { - display: inline-block; - width: 140px; -} - -aside span { - overflow: hidden; - text-overflow: "~"; - white-space: nowrap; - width: 74px; -} - -aside:nth-child(odd) { - margin-right: 4px; - text-align: right; -} - -aside:nth-child(even) { - margin-left: 4px; - text-align: left; -} - -aside:nth-child(even) span { - float: right; - padding-left: 4px; - text-align: left; -} - -aside:nth-child(odd) span { - float: left; - padding-right: 4px; - text-align: right; -} - -#randdetails tt { - font-family: inherit; - cursor: help; -} - - -/* resonators */ -#resodetails { - white-space: nowrap; - margin: 16px 0; - -moz-column-gap: 10px; - -moz-column-width: 141px; - -webkit-column-gap: 10px; - -webkit-column-width: 141px; -} - -.meter { - background: #000; - cursor: help; - display: inline-block; - height: 14px; - padding: 1px; - width: 58px; -} - -.meter-text { - display: inline-block; - height: 18px; - margin: 0 4px; - overflow: hidden; - text-overflow: "~"; - vertical-align: top; - white-space: nowrap; - width: 75px; -} - -.meter-text.left { - text-align: right; -} - -.meter span { - display: block; - height: 14px; -} - -.meter-rel { - position: relative; - left: 0; - top: 0; -} - -.meter-level { - position: absolute; - top: -2px; - left: 25px; - text-shadow: 0.0em 0.0em 0.3em #808080; -} -/* links below resos */ - -.linkdetails { - text-align: center; - margin-bottom: 10px; -} -.linkdetails aside { - margin: 0 4px; - width: 140px; -} - -#toolbox { - padding: 4px; - font-size:90%; -} - -#toolbox > a { - padding: 5px; -} - -/* a common portal display takes this much space (prevents moving - * content when first selecting a portal) */ - -#portaldetails { - min-height: 553px; -} - - -/* update status */ -#updatestatus { - background-color: rgba(8, 48, 78, 0.9); - border-bottom: 0; - border-top: 1px solid #20A8B1; - border-left: 1px solid #20A8B1; - bottom: 0; - color: #ffce00; - font-size:13px; - padding: 4px; - position: fixed; - right: 0; - z-index:3002; -} - - -/* preview */ - -#largepreview { - left: 50%; - position: fixed; - top: 50%; - z-index: 2000; -} -#largepreview img { - box-shadow: 0 0 40px #000; -} -#largepreview img { - border: 2px solid #f8ff5e; -} diff --git a/dist/delaunay.js b/external/delaunay.js similarity index 100% rename from dist/delaunay.js rename to external/delaunay.js diff --git a/plugins/max-links.user.js b/plugins/max-links.user.js index 61f0e487..8759a208 100644 --- a/plugins/max-links.user.js +++ b/plugins/max-links.user.js @@ -84,7 +84,7 @@ window.plugin.maxLinks.updateLayer = function() { window.plugin.maxLinks.setup = function() { try { console.log('Loading delaunay JS now'); } catch(e) {} - @@INCLUDERAW:dist/delaunay.js@@ + @@INCLUDERAW:external/delaunay.js@@ try { console.log('done loading delaunay JS'); } catch(e) {} window.delaunay.Triangle.prototype.draw = function(layer, divX, divY) {