Skip to content

Commit

Permalink
Update rhombus-icon.js
Browse files Browse the repository at this point in the history
  • Loading branch information
iatkin committed Feb 5, 2019
1 parent a655344 commit b8567ce
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions subclasses/rhombus-icon.js
Expand Up @@ -20,20 +20,6 @@ L.DivIcon.SVGIcon.RhombusIcon = L.DivIcon.SVGIcon.extend({
var d = startPoint + bottomLeftLine + bottomRightLine + topLeftLine

return d
},
_createText: function() {
var fontSize = this.options.fontSize + "px"
var fontWeight = this.options.fontWeight
var lineHeight = Number(this.options.fontSize)

var x = Number(this.options.iconSize.x) / 2
var y = Number(this.options.iconSize.y) / 2 + (lineHeight * 0.35) //35% was found experimentally
var circleText = this.options.circleText
var textColor = this.options.fontColor.replace("rgb(", "rgba(").replace(")", "," + this.options.fontOpacity + ")")

var text = '<text text-anchor="middle" x="' + x + '" y="' + y + '" style="font-size: ' + fontSize + '; font-weight: ' + fontWeight +'" fill="' + textColor + '">' + circleText + '</text>'

return text
}
})

Expand Down

0 comments on commit b8567ce

Please sign in to comment.