added iconColor option so this is in sync with bootstraps icons

This commit is contained in:
Lennard Voogdt
2013-03-17 14:59:03 +01:00
parent 2b55a1c544
commit 9f446acc96
2 changed files with 10 additions and 3 deletions
+5 -1
View File
@@ -23,12 +23,16 @@ Version: 1.0
}
.awesome-marker i {
color: #fff;
color: #333;
margin-top: 10px;
display: inline-block;
font-size: 14px;
}
.awesome-marker .icon-white {
color: #fff;
}
/* Colors */
.awesome-marker-icon-red {
background-position: 0 0;
+5 -2
View File
@@ -23,7 +23,8 @@ L.AwesomeMarkers.Icon = L.Icon.extend({
shadowSize: [36, 16],
className: 'awesome-marker',
icon: 'home',
color: 'blue'
color: 'blue',
iconColor: 'white'
},
initialize: function (options) {
@@ -54,7 +55,9 @@ L.AwesomeMarkers.Icon = L.Icon.extend({
}else{
iconClass="icon-"+this.options.icon;
}
return "<i class='" + iconClass + (this.options.spin ? " icon-spin" :"") + "'></i>";
return "<i class='" + iconClass
+ (this.options.spin ? " icon-spin" :"")
+ (this.options.iconColor ? " icon-" + this.options.iconColor :"") + "'></i>";
},
_setIconStyles: function (img, name) {