Closed sndirsch closed 1 year ago
The above is with current Desktop version IITC-CE v0.33.0 and 'Highlight portals missing resonators' plugin version 0.2.0.
Things look fine with Android Version 0.32.1 for some reason.
Going back to old code fixes it for me.
0001-highlight-missing-resonators.js-fixes-issue-590.patch.txt
From 0e07c62a59aa1372f2715a5fa48a54f878e47041 Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <sndirsch@suse.de>
Date: Mon, 17 Oct 2022 17:08:59 +0200
Subject: [PATCH] highlight-missing-resonators.js: fixes issue #590
Going back to old code fixes the issue for me ...
---
plugins/highlight-missing-resonators.js | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/plugins/highlight-missing-resonators.js b/plugins/highlight-missing-resonators.js
index 4eabbf94..6fd7583e 100644
--- a/plugins/highlight-missing-resonators.js
+++ b/plugins/highlight-missing-resonators.js
@@ -7,14 +7,6 @@
/* exported setup --eslint */
/* global L, TEAM_NONE */
// use own namespace for plugin
-var highlightMissingResonators = {};
-window.plugin.highlightMissingResonators = highlightMissingResonators;
-
-highlightMissingResonators.styles = {
- common: {
- fillcolor: 'red'
- }
-};
function missingResonators (data) {
@@ -23,13 +15,12 @@ function missingResonators (data) {
if (res_count !== undefined && res_count < 8) {
var fill_opacity = ((8-res_count)/8)*.85 + .15;
- // Hole per missing resonator
- var dash = new Array((8 - res_count) + 1).join('1,4,') + '100,0';
+ var color = 'red';
+ var params = {fillColor: color, fillOpacity: fill_opacity};
- var params = L.extend({},
- highlightMissingResonators.styles.common,
- {fillOpacity: fill_opacity, dashArray: dash}
- );
+ // Hole per missing resonator
+ var dash = new Array((8 - res_count) + 1).join("1,4,") + "100,0"
+ params.dashArray = dash;
data.portal.setStyle(params);
}
--
2.35.3
So basically, the issue is about the portal not being red while missing resonators.
This is due to a typo in the code fillcolor
vs fillColor
@le-jeu Thanks a lot! Sorry, I missed your PR. Removed mine. It was incomplete anyway as I see now when looking at yours ...
Unfortunately with this plugin you can hardly distinguish portals with missing resos from portals filled with 8 resos.
The 3 portals on the right side have only one reso. The one on the right side is filled with 8 resos.
This was done way better with the old plugin from https://iitc.me/desktop/