highlight: increase fillOpacity for polygons
sqrt gives larger increase for low opacities like 0.2 while preserving some (tiny) shine-through for large values like 0.8 and is limited to the desired range of (0,1]
This commit is contained in:
parent
836c17f2e8
commit
9ef09512db
1 changed files with 2 additions and 0 deletions
|
@ -822,6 +822,7 @@ L.U.PathMixin = {
|
|||
|
||||
highlightPath: function () {
|
||||
this.parentClass.prototype.setStyle.call(this, {
|
||||
fillOpacity: Math.sqrt(this.getDynamicOption('fillOpacity')),
|
||||
opacity: 1.0,
|
||||
weight: 1.3 * this.getDynamicOption('weight'),
|
||||
})
|
||||
|
@ -829,6 +830,7 @@ L.U.PathMixin = {
|
|||
|
||||
resetPath: function () {
|
||||
this.parentClass.prototype.setStyle.call(this, {
|
||||
fillOpacity: this.getDynamicOption('fillOpacity'),
|
||||
opacity: this.getDynamicOption('opacity'),
|
||||
weight: this.getDynamicOption('weight'),
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue