Fix mouseover for bold lines

pull/108/head
Candid Dauth 2019-01-16 01:45:06 +01:00
rodzic 3efdbe6321
commit 877ce085d5
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -110,9 +110,6 @@ fm.app.factory("fmHighlightableLayers", function(fmUtils) {
}
_regenerateStyle() {
this.options.opacity = 0;
this.options.weight = 20;
let isBright = fmUtils.getBrightness(this.options.color.replace(/^#/, "")) > 0.7;
// A black border makes the lines look thicker, thus we decrease the thickness to make them look the original size again
@ -123,6 +120,9 @@ fm.app.factory("fmHighlightableLayers", function(fmUtils) {
this.borderLayer.options.color = this.borderLayer.options.fillColor = isBright ? "#000000" : "#ffffff";
this.borderLayer.options.weight = this.lineLayer.options.weight * 2;
this.options.opacity = 0;
this.options.weight = Math.max(20, this.borderLayer.options.weight);
fmHighlightableLayers._updatePane(this, "fmAlmostOverPane");
fmHighlightableLayers._updatePane(this.lineLayer, this.options.highlight || this.options.rise ? "fmHighlightPane" : "overlayPane");
fmHighlightableLayers._updatePane(this.borderLayer, this.options.highlight || this.options.rise ? "fmHighlightShadowPane" : "fmShadowPane");