mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 00:11:49 +02:00
added spinClass option
This commit is contained in:
+25
-25
@@ -31,16 +31,16 @@
|
|||||||
"outputAbbreviatedPath" : "No Output Path",
|
"outputAbbreviatedPath" : "No Output Path",
|
||||||
"fileType" : 2048
|
"fileType" : 2048
|
||||||
},
|
},
|
||||||
"\/dist\/leaflet.awesome-markers.min.js" : {
|
"\/dist\/images\/markers-shadow.png" : {
|
||||||
"ignoreWasSetByUser" : 0,
|
"ignoreWasSetByUser" : 0,
|
||||||
"ignore" : 1,
|
"ignore" : 0,
|
||||||
"hidden" : 0,
|
"hidden" : 0,
|
||||||
"outputPathIsSetByUser" : 0,
|
"outputPathIsSetByUser" : 0,
|
||||||
"inputAbbreviatedPath" : "\/dist\/leaflet.awesome-markers.min.js",
|
"inputAbbreviatedPath" : "\/dist\/images\/markers-shadow.png",
|
||||||
"outputStyle" : 1,
|
"processed" : 0,
|
||||||
"syntaxCheckerStyle" : 1,
|
"outputAbbreviatedPath" : "\/dist\/images\/markers-shadow.png",
|
||||||
"outputAbbreviatedPath" : "\/dist\/leaflet.awesome-markers.min.min.js",
|
"initialSize" : 535,
|
||||||
"fileType" : 64
|
"fileType" : 8192
|
||||||
},
|
},
|
||||||
"\/examples\/css\/font-awesome.min.css" : {
|
"\/examples\/css\/font-awesome.min.css" : {
|
||||||
"ignoreWasSetByUser" : 0,
|
"ignoreWasSetByUser" : 0,
|
||||||
@@ -62,6 +62,17 @@
|
|||||||
"initialSize" : 218197,
|
"initialSize" : 218197,
|
||||||
"fileType" : 8192
|
"fileType" : 8192
|
||||||
},
|
},
|
||||||
|
"\/dist\/images\/markers-soft@2x.png" : {
|
||||||
|
"ignoreWasSetByUser" : 0,
|
||||||
|
"ignore" : 0,
|
||||||
|
"hidden" : 0,
|
||||||
|
"outputPathIsSetByUser" : 0,
|
||||||
|
"inputAbbreviatedPath" : "\/dist\/images\/markers-soft@2x.png",
|
||||||
|
"processed" : 0,
|
||||||
|
"outputAbbreviatedPath" : "\/dist\/images\/markers-soft@2x.png",
|
||||||
|
"initialSize" : 23106,
|
||||||
|
"fileType" : 8192
|
||||||
|
},
|
||||||
"\/examples\/with-bootstrap.html" : {
|
"\/examples\/with-bootstrap.html" : {
|
||||||
"ignoreWasSetByUser" : 0,
|
"ignoreWasSetByUser" : 0,
|
||||||
"ignore" : 0,
|
"ignore" : 0,
|
||||||
@@ -93,17 +104,6 @@
|
|||||||
"outputAbbreviatedPath" : "\/dist\/leaflet.awesome-markers.min.js",
|
"outputAbbreviatedPath" : "\/dist\/leaflet.awesome-markers.min.js",
|
||||||
"fileType" : 64
|
"fileType" : 64
|
||||||
},
|
},
|
||||||
"\/dist\/images\/markers-shadow.png" : {
|
|
||||||
"ignoreWasSetByUser" : 0,
|
|
||||||
"ignore" : 0,
|
|
||||||
"hidden" : 0,
|
|
||||||
"outputPathIsSetByUser" : 0,
|
|
||||||
"inputAbbreviatedPath" : "\/dist\/images\/markers-shadow.png",
|
|
||||||
"processed" : 0,
|
|
||||||
"outputAbbreviatedPath" : "\/dist\/images\/markers-shadow.png",
|
|
||||||
"initialSize" : 535,
|
|
||||||
"fileType" : 8192
|
|
||||||
},
|
|
||||||
"\/dist\/images\/markers-soft.png" : {
|
"\/dist\/images\/markers-soft.png" : {
|
||||||
"ignoreWasSetByUser" : 0,
|
"ignoreWasSetByUser" : 0,
|
||||||
"ignore" : 0,
|
"ignore" : 0,
|
||||||
@@ -126,16 +126,16 @@
|
|||||||
"initialSize" : 7946,
|
"initialSize" : 7946,
|
||||||
"fileType" : 8192
|
"fileType" : 8192
|
||||||
},
|
},
|
||||||
"\/dist\/images\/markers-soft@2x.png" : {
|
"\/dist\/leaflet.awesome-markers.min.js" : {
|
||||||
"ignoreWasSetByUser" : 0,
|
"ignoreWasSetByUser" : 0,
|
||||||
"ignore" : 0,
|
"ignore" : 1,
|
||||||
"hidden" : 0,
|
"hidden" : 0,
|
||||||
"outputPathIsSetByUser" : 0,
|
"outputPathIsSetByUser" : 0,
|
||||||
"inputAbbreviatedPath" : "\/dist\/images\/markers-soft@2x.png",
|
"inputAbbreviatedPath" : "\/dist\/leaflet.awesome-markers.min.js",
|
||||||
"processed" : 0,
|
"outputStyle" : 1,
|
||||||
"outputAbbreviatedPath" : "\/dist\/images\/markers-soft@2x.png",
|
"syntaxCheckerStyle" : 1,
|
||||||
"initialSize" : 23106,
|
"outputAbbreviatedPath" : "\/dist\/leaflet.awesome-markers.min.min.js",
|
||||||
"fileType" : 8192
|
"fileType" : 64
|
||||||
},
|
},
|
||||||
"\/examples\/random-markers.html" : {
|
"\/examples\/random-markers.html" : {
|
||||||
"ignoreWasSetByUser" : 0,
|
"ignoreWasSetByUser" : 0,
|
||||||
|
|||||||
Vendored
+11
-7
@@ -26,6 +26,8 @@
|
|||||||
shadowAnchor: [10, 12],
|
shadowAnchor: [10, 12],
|
||||||
shadowSize: [36, 16],
|
shadowSize: [36, 16],
|
||||||
className: 'awesome-marker',
|
className: 'awesome-marker',
|
||||||
|
prefix: 'glyphicon',
|
||||||
|
spinClass: 'fa-spin',
|
||||||
icon: 'home',
|
icon: 'home',
|
||||||
markerColor: 'blue',
|
markerColor: 'blue',
|
||||||
iconColor: 'white'
|
iconColor: 'white'
|
||||||
@@ -53,13 +55,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
_createInner: function() {
|
_createInner: function() {
|
||||||
var iconClass;
|
var iconClass,
|
||||||
// if(this.options.icon.slice(0,5)==="icon-"){
|
options = this.options;
|
||||||
iconClass=this.options.icon;
|
|
||||||
// }else{
|
if(options.icon.slice(0,options.prefix.length+1) === options.prefix + "-") {
|
||||||
// iconClass="icon-"+this.options.icon;
|
iconClass = options.icon;
|
||||||
// }
|
} else {
|
||||||
return "<i class='" + iconClass + (this.options.spin ? " icon-spin" :"") + (this.options.iconColor ? " icon-" + this.options.iconColor :"") + "'></i>";
|
iconClass = options.prefix + "-" + options.icon;
|
||||||
|
}
|
||||||
|
return "<i class='" + iconClass + (options.spin ? " " + options.spinClass : "") + (options.iconColor ? " icon-" + options.iconColor :"") + "'></i>";
|
||||||
},
|
},
|
||||||
|
|
||||||
_setIconStyles: function (img, name) {
|
_setIconStyles: function (img, name) {
|
||||||
|
|||||||
Vendored
+1
-1
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
http://leafletjs.com
|
http://leafletjs.com
|
||||||
https://github.com/lvoogdt
|
https://github.com/lvoogdt
|
||||||
*//*global L*/(function(e,t,n){"use strict";L.AwesomeMarkers={};L.AwesomeMarkers.version="1.0";L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",icon:"home",markerColor:"blue",iconColor:"white"},initialize:function(e){e=L.setOptions(this,e)},createIcon:function(){var e=t.createElement("div"),n=this.options;n.icon&&(e.innerHTML=this._createInner());n.bgPos&&(e.style.backgroundPosition=-n.bgPos.x+"px "+ -n.bgPos.y+"px");this._setIconStyles(e,"icon-"+n.markerColor);return e},_createInner:function(){var e;e=this.options.icon;return"<i class='"+e+(this.options.spin?" icon-spin":"")+(this.options.iconColor?" icon-"+this.options.iconColor:"")+"'></i>"},_setIconStyles:function(e,t){var n=this.options,r=L.point(n[t==="shadow"?"shadowSize":"iconSize"]),i;t==="shadow"?i=L.point(n.shadowAnchor||n.iconAnchor):i=L.point(n.iconAnchor);!i&&r&&(i=r.divideBy(2,!0));e.className="awesome-marker-"+t+" "+n.className;if(i){e.style.marginLeft=-i.x+"px";e.style.marginTop=-i.y+"px"}if(r){e.style.width=r.x+"px";e.style.height=r.y+"px"}},createShadow:function(){var e=t.createElement("div");this._setIconStyles(e,"shadow");return e}});L.AwesomeMarkers.icon=function(e){return new L.AwesomeMarkers.Icon(e)}})(this,document);
|
*//*global L*/(function(e,t,n){"use strict";L.AwesomeMarkers={};L.AwesomeMarkers.version="1.0";L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",prefix:"glyphicon",spinClass:"fa-spin",icon:"home",markerColor:"blue",iconColor:"white"},initialize:function(e){e=L.setOptions(this,e)},createIcon:function(){var e=t.createElement("div"),n=this.options;n.icon&&(e.innerHTML=this._createInner());n.bgPos&&(e.style.backgroundPosition=-n.bgPos.x+"px "+ -n.bgPos.y+"px");this._setIconStyles(e,"icon-"+n.markerColor);return e},_createInner:function(){var e,t=this.options;t.icon.slice(0,t.prefix.length+1)===t.prefix+"-"?e=t.icon:e=t.prefix+"-"+t.icon;return"<i class='"+e+(t.spin?" "+t.spinClass:"")+(t.iconColor?" icon-"+t.iconColor:"")+"'></i>"},_setIconStyles:function(e,t){var n=this.options,r=L.point(n[t==="shadow"?"shadowSize":"iconSize"]),i;t==="shadow"?i=L.point(n.shadowAnchor||n.iconAnchor):i=L.point(n.iconAnchor);!i&&r&&(i=r.divideBy(2,!0));e.className="awesome-marker-"+t+" "+n.className;if(i){e.style.marginLeft=-i.x+"px";e.style.marginTop=-i.y+"px"}if(r){e.style.width=r.x+"px";e.style.height=r.y+"px"}},createShadow:function(){var e=t.createElement("div");this._setIconStyles(e,"shadow");return e}});L.AwesomeMarkers.icon=function(e){return new L.AwesomeMarkers.Icon(e)}})(this,document);
|
||||||
Reference in New Issue
Block a user